This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Delete redundant ppc opcode flags
On Mon, Jul 19, 2010 at 10:52:02PM -0500, Peter Bergner wrote:
[snip]
> .../xgcc -B.../ .../gcc.target/powerpc/recip-7.c -O3 -ftree-vectorize \
> -ffast-math -mrecip -mpowerpc-gfxopt -mpowerpc-gpopt -mpopcntb -lm \
> -m64 -o ./recip-7.exe
> /tmp/cc8OaJ5X.s: Assembler messages:
> /tmp/cc8OaJ5X.s:2018: Error: Unrecognized opcode: `srdi'
[snip]
> Obviously, we should fix the GCC bug
There are rather a lot of bugs in the gcc options passed to gas,
mostly covered by passing -many. Take that out and you'll discover
your testcase needs more than just -mppc64 to assemble..
>, but should we also add back the
> PPC_OPCODE_PPC flag to PPC64 to allow old GCC sources to work with the
> new gas, or are the -mpowerpc-* GCC options so uncommonly used, that
> we should only patch GCC? Your thoughts?
Putting PPC_OPCODE_PPC back into PPC64 would be wrong, but that
particular change uncovered a latent gas bug. -many ought to enable
all instructions, but it didn't do so for extended insns implemented
as macros. Easily fixed.
* config/tc-ppc.c (ppc_setup_opcodes): Add all macros for -many.
Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.171
diff -u -p -r1.171 tc-ppc.c
--- gas/config/tc-ppc.c 3 Jul 2010 08:27:23 -0000 1.171
+++ gas/config/tc-ppc.c 20 Jul 2010 04:42:41 -0000
@@ -1498,7 +1498,7 @@ ppc_setup_opcodes (void)
macro_end = powerpc_macros + powerpc_num_macros;
for (macro = powerpc_macros; macro < macro_end; macro++)
{
- if ((macro->flags & ppc_cpu) != 0)
+ if ((macro->flags & ppc_cpu) != 0 || (ppc_cpu & PPC_OPCODE_ANY) != 0)
{
const char *retval;
--
Alan Modra
Australia Development Lab, IBM