This is the mail archive of the
mailing list for the binutils project.
Re: mtsprg on BOOKE
- From: Jeff Baker <jbaker at qnx dot com>
- To: James E Wilson <wilson at specifixinc dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 02 Nov 2004 10:34:53 -0500
- Subject: Re: mtsprg on BOOKE
- Organization: QNX Software Systems Ltd.
- References: <firstname.lastname@example.org>
- Reply-to: jbaker at qnx dot com
Thanks, I figured out how to get this working... sortof. I can change
the generic SPRG/SPRG_MASK definitions as a quick test so I know I'm
making the correct modification, but I don't know how to define the
mfsprg and mtsprg ops in such a way as it won't complain about duplicate
James E Wilson wrote:
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.