Power4 should treat mftb as extended mfspr mnemonic
Mon Dec 1 00:46:00 GMT 2014
On Sun, Nov 30, 2014 at 12:02:09PM -0600, Segher Boessenkool wrote:
> On Sun, Nov 30, 2014 at 01:36:55PM +1030, Alan Modra wrote:
> > On Fri, Nov 28, 2014 at 02:34:54PM +1030, Alan Modra wrote:
> > > mftb is marked phased out in the architecture manual, but we can keep
> > > it as an extended mnemonic for mftbl.
> > On further reading of ISA manual it appears gas should have been
> > treating mftb and mftbu as extended mnemonics for mfspr, for ISA 2.03
> > and later. The 31,371 opcode is phased out, not the mnemonic.
> > opcodes/
> > * ppc-opc.c (powerpc_opcodes): Make mftb* generate mfspr for
> > power4 and later.
> Does that work with current GCC (for its mftb builtins)? I.e. what
> does this do with -many, does it generate mftb or mfspr insns?
It depends on what cpu option is passed to gas before -many. So for
instance -mpower7 -many will get you mfspr, -mppc64 -many will give
> > - 4b4: (7c 6c 42 e6|e6 42 6c 7c) mftbl r3
> > + 4b4: (7c 6c 42 a6|a6 42 6c 7c) mftb r3
> Nice to see this nuisance finally fixed. Although, only for 476 and a2?
No, like the changelog says, for power4 and later. We lack testsuite
grep mftb *.s
476.s: mftb 3
a2.s: mftb 10,268
a2.s: mftb 10,269
titan.s: mftbl 4
titan.s: mftb 4
titan.s: mftbu 4
Australia Development Lab, IBM
More information about the Binutils