2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / hle-cmpxchg-rel-1.c
bloba2749e82ff81bf2551185e6668fd84ebd871e5f5
1 /* { dg-do compile } */
2 /* { dg-options "-march=x86-64 -mhle" } */
3 /* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+cmpxchg" } } */
5 int
6 hle_cmpxchg (int *p, int oldv, int newv)
8 return __atomic_compare_exchange_n (p, &oldv, newv, 0, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE, __ATOMIC_ACQUIRE);