[PATCH] powerpc: ignore opcodes on e500/SPE which can't be mixed

Alan Modra amodra@gmail.com
Mon May 3 11:05:00 GMT 2010


On Mon, May 03, 2010 at 10:10:21AM +0200, Sebastian Andrzej Siewior wrote:
> * Alan Modra | 2010-05-03 16:01:15 [+0930]:
> 
> >On Sun, May 02, 2010 at 03:41:32PM +0200, Sebastian Andrzej Siewior wrote:
> >> +	* ppc-opcodes.c: Deprecate all PPCVEC opcodes on PPCSPE,
> >> +	deprecate opcodes which use floating point registers on PPCEFS,
> >> +	deprecate lwsync on PPCSPE.
> >
> >This isn't correct.  Please don't add the "deprecate" to all vec/fp
> I though the deprecate flag is for invalid mix of opcodes.

It was really a means to disable a few opcodes from the common powerpc
set for newer processors that implement most of them but have a few
exceptions, perhaps using a new encoding.  

> >opcodes like this.  Most should not be enabled for e500 anyway, so
> >don't need to be deprecated.  
> The compiler throws in -mppc -mspe -me500 -many. The first three are CPU
> specific, the last one is used by gcc for all powerpcs.

-many is supposed to assemble for any processor!  Have you actually
tried your patch with -many to see what happens?  I think you'll find
setting "deprecated" has no effect, except to match a non-deprecated
instruction before a deprecated one.

[snip]
> Is there something you recommend so I can forbid this?

First, I think you will need to stop gcc passing -many.  Then just
change the instructions you really must.  If I've counted correctly,
that will be 86 changes to the opcodes table.

> >Also, I see you disabled "lfdepx".
> Why disabled? I marked all opcodes which touch FP regs. I could make a
> sane subset which exlude power6 and so on. If you refer to E500MC then
> that one does not use embedded FPU, it uses the "traditional" one.

My mistake.  I'm not that familiar with e500.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list