[Bug target/76774] atomics on PPC: inconsistent widths for an _Atomic(_Bool) and for atomic_compare_exchange_strong on it

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 16 13:12:00 GMT 2016


Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Peter Sewell from comment #4)
> (In reply to Andrew Pinski from comment #3)
> > What code were you expecting anyways?
> I hadn't noticed how recent the other-size LL/SC were.  But then I would
> have expected a 4-byte representation for _Atomic(_Bool) on the older
> machines, to minimise the amount of code between the lwarx and stwcx; would
> that have some other disadvantage?

Yes that would break Abis. In that power7 compiled code would be incompatible
with power9 one. 

> I don't think the code you've got is functionally wrong on normal h/w.  We
> noticed this running in a semantics-based emulator that's very picky about
> reading from uninitialised memory, but on normal h/w the extra memory will
> AFAICS always be mapped and be within the same reservation granule.

Sorry but there is nothing that can be done here. This is a similar issue on
mips too.

More information about the Gcc-bugs mailing list