[PATCH] powerpc: e500: Fix compilation with gcc e500 compiler

Segher Boessenkool segher at kernel.crashing.org
Tue Jul 12 07:48:40 AEST 2022


Hi!

On Mon, Jul 11, 2022 at 05:32:09PM +0000, Christophe Leroy wrote:
> Le 11/07/2022 à 18:14, Segher Boessenkool a écrit :
> >>     CC      arch/powerpc/kernel/irq.o
> >> {standard input}: Assembler messages:
> >> {standard input}:3535: Error: unrecognized opcode: `wrteei'
> >> {standard input}:5608: Error: unrecognized opcode: `wrteei'
> > 
> > What -mcpu= did it use here?
> 
> -mcpu=powerpc64
> 
> > wrteei is not a PowerPC insn (it is BookE, instead), so it is not
> > recognised without an appropriate -mcpu=.
> > 
> >> If I select the e5500 (without altivec) or e6500 I get:
> >>
> >>     CC      arch/powerpc/kernel/io.o
> >> {standard input}: Assembler messages:
> >> {standard input}:381: Error: unrecognized opcode: `eieio'
> > 
> > Same question.  eieio is a base PowerPC instruction, so this one is
> > "interesting" :-)
> 
> -mcpu=e500mc64 (for e5500)
> -mcpu=e6500 (for e6500)
> 
> I had to replace 'eieio' instruction by 'mbar' instruction.

I saw some patches fly by...  you have it all fixed with that?

> Seems like binutils added 'eieio' to e500 in 2010 via commit 
> e01d869a3be, but it seems it is only for the 85xx, not for the others.

I believe the eieio instruction is disabled on some e500 models, because
it does not work correctly, so EIEIO_EN=1 cannot work, something like
that?


Segher


More information about the Linuxppc-dev mailing list