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" } } */ 4 5 int hle_cmpxchg(int * p,int oldv,int newv)6hle_cmpxchg (int *p, int oldv, int newv) 7 { 8 return __atomic_compare_exchange_n (p, &oldv, newv, 0, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE, __ATOMIC_ACQUIRE); 9 } 10