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

Christophe Leroy christophe.leroy at csgroup.eu
Tue Jul 12 03:32:09 AEST 2022



Le 11/07/2022 à 18:14, Segher Boessenkool a écrit :
> On Sat, Jul 09, 2022 at 09:26:11AM +0000, Christophe Leroy wrote:
>> If I select the GENERIC_CPU or e5500 (with altivec) I get:
>>
>>     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.


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.

Christophe


More information about the Linuxppc-dev mailing list