https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878

LIU Hao <lh_mouse at 126 dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lh_mouse at 126 dot com

--- Comment #36 from LIU Hao <lh_mouse at 126 dot com> ---
(In reply to Andrew Pinski from comment #1)
> IIRC this was removed as the instruction cannot be used for read only memory.

That's not a valid argument. The first argument is a pointer to non-const type,
and whoever passes a read-only object bears the risk on their own.

As mention in previous posts, the double-word compare-and-swap operation is
invaluable for many algorithms. The fact that GCC does not generate it, even
when requested explicitly with `-mcx16`, is silly and unacceptable.

--- Comment #37 from LIU Hao <lh_mouse at 126 dot com> ---
(In reply to Andrew Pinski from comment #31)
> Again the problem is stuff like:
> static const _Atomic __int128_t t = 2000;
> 
> __int128_t g(void)
> {
>   return t;
> }
> 
> DOES NOT WORK if you use CAS (or ldaxp/stlxp).
> 

Can this be made using MOVDQA instead? I haven't tested this though, just out
of curiosity.

Reply via email to