aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/acswap/test_swapw.c
blob: 906938e028a2f37d39f6100f79c62f99790f6dc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>

int main() {
  unsigned loc=11, next=12, current=11;
  union {
    __int128 i128;
    struct {
      unsigned long low, high;
    } i64_2;
  } ret;
  ret.i128 = __builtin_k1_acswapw(&loc, next, current);
  printf("%lx %lx\n", ret.i64_2.low, ret.i64_2.high);
}