This is the mail archive of the
mailing list for the binutils project.
Re: mtsprg on BOOKE
- From: James E Wilson <wilson at specifixinc dot com>
- To: jbaker at qnx dot com
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 01 Nov 2004 14:30:43 -0800
- Subject: Re: mtsprg on BOOKE
- References: <firstname.lastname@example.org> <email@example.com>
On Mon, 2004-11-01 at 07:26, Jeff Baker wrote:
> I've never worked in the opcodes area before and I'm not sure how to
> implement this change. Can anyone give me a hand?
Find the mtsprg entry in the opcodes/ppc-opc.c file.
Most ports do a sequential search, and take the first matching entry.
So you can add a second mtsprg entry immediately before the existing
one, where this additional entry is only enabled for booke (and
ppc405?). You will need to adjust the masks and operand bits as
appropriate. You can't change the definition of existing macros, but
you can add new ones that are correct for the booke case, and use them
in this new entry.
Some targets use operand specifiers that are interpreted by the
assembler. In this case, you can modify e.g. config/tc-ppc.c to
interpret the operand specifier differently depending on the
architecture. The PPC port does not appear to use this scheme though.
So it looks like we have to modify the opcodes/ppc-opc.c file directly.
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com