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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This was implemented back in GCC 4.7.x when __atomic_fetch_and and
__atomic_and_fetch was added.
I get the lock and and lock xor for the following already back then:
void f (int *a)
{
    __atomic_fetch_and(a, 10, 5);
}
void f1 (int *a)
{
    __atomic_and_fetch(a, 10, 5);
}

void f2 (int *a)
{
    __atomic_fetch_xor(a, 10, 5);
}
void f12 (int *a)
{
    __atomic_xor_fetch(a, 10, 5);
}

Reply via email to