This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/76774] atomics on PPC: inconsistent widths for an _Atomic(_Bool) and for atomic_compare_exchange_strong on it
- From: "Peter.Sewell at cl dot cam.ac.uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 16 Aug 2016 10:22:32 +0000
- Subject: [Bug target/76774] atomics on PPC: inconsistent widths for an _Atomic(_Bool) and for atomic_compare_exchange_strong on it
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-76774-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=76774
--- Comment #4 from Peter Sewell <Peter.Sewell at cl dot cam.ac.uk> ---
(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?
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.