This is the mail archive of the
mailing list for the binutils project.
Re: Power4 should treat mftb as extended mfspr mnemonic
- From: Alan Modra <amodra at gmail dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: binutils at sourceware dot org
- Date: Mon, 1 Dec 2014 11:15:59 +1030
- Subject: Re: Power4 should treat mftb as extended mfspr mnemonic
- Authentication-results: sourceware.org; auth=none
- References: <20141128040454 dot GH20383 at bubble dot grove dot modra dot org> <20141130030655 dot GI20383 at bubble dot grove dot modra dot org> <20141130180209 dot GA31176 at gate dot crashing dot org>
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