Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.target / i386 / hle-xor-acq-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-mhle" } */
3 /* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+xor" } } */
4
5 void
6 hle_xor (int *p, int v)
7 {
8   __atomic_fetch_xor (p, v, __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE);
9 }