aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/hle-xchg-rel-1.c
blob: a6bad3335dcc85c615fbb15600fd5a3489406aff (plain)
1
2
3
4
5
6
7
8
9
/* { dg-do compile } */
/* { dg-options "-mhle" } */
/* { dg-final { scan-assembler "\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+xchg" } } */

int
hle_xchg (int *p, int v)
{
  return __atomic_exchange_n (p, v, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE);
}