mtsprg on BOOKE

Jeff Baker jbaker@qnx.com
Tue Nov 2 15:34:00 GMT 2004


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 
insns.

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.



More information about the Binutils mailing list