[Bug target/80878] -mcx16 (enable 128 bit CAS) on x86_64 seems not to work on 7.1.0
fw at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Apr 18 18:41:20 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878
--- Comment #26 from Florian Weimer <fw at gcc dot gnu.org> ---
(In reply to Florian Weimer from comment #23)
> Ahh, I think this bug here is specific to __uint128 (with the C front end at
> least)
>
> The C translation of the C++ reproducer from comment 20:
>
> struct a
> {
> long _Alignas(16) x;
> long y;
> };
>
> _Bool
> cmpxchg (struct a *data, struct a expected, struct a newval)
> {
> return __atomic_compare_exchange_n (&data, &expected, &newval, 1,
> __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
> }
>
> produces the atomic instruction.
Eh, no, that code does something else.
More information about the Gcc-bugs
mailing list