This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Power4 should treat mftb as extended mfspr mnemonic
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: binutils at sourceware dot org
- Date: Sun, 30 Nov 2014 12:02:09 -0600
- 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>
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?
> - 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?
Segher