This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mtsprg on BOOKE


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]