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

From: Segher Boessenkool
Date: Tue Jul 12 2022 - 10:14:45 EST

On Tue, Jul 12, 2022 at 09:22:12AM +0000, Christophe Leroy wrote:
> Le 11/07/2022 à 23:48, Segher Boessenkool a écrit :
> > 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?
> Don't know.
> It is also disabled on 405 and 440.

BookE does not have the eieio insn. Instead, it reuses the same opcode
for mbar, which has similar but different semantics.

e500 has that EIEIO_EN thing which makes the insn behave like eieio.

> That's new with GCC 12.

Yup. In the past we used -many, but that just hides problems in the
best case, and causes more problems itself :-(

There are many mnemonics that cause a different instruction to be
emitted on different targets, and that causes a lot of wasted time
trying to find and fix the problems this causes.

If you hit any remaining problems related to this, please let me know!