diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-11 17:07:24 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-11 17:07:24 +0200 |
commit | baeed85dd8d1c7ef54a72bf2db2381d03de05cb6 (patch) | |
tree | 6d5de419eca025303e13e21d20457985fa559d85 /test/monniaux | |
parent | 6661d3cd45b9cce948fc7feb2d4cc21da1352914 (diff) | |
download | compcert-kvx-baeed85dd8d1c7ef54a72bf2db2381d03de05cb6.tar.gz compcert-kvx-baeed85dd8d1c7ef54a72bf2db2381d03de05cb6.zip |
builtin acswapd
Diffstat (limited to 'test/monniaux')
-rw-r--r-- | test/monniaux/int128/test_swap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/monniaux/int128/test_swap.c b/test/monniaux/int128/test_swap.c new file mode 100644 index 00000000..4841f040 --- /dev/null +++ b/test/monniaux/int128/test_swap.c @@ -0,0 +1,13 @@ +#include <stdio.h> + +int main() { + unsigned long long loc=10, next=12, current=11; + union { + __int128 i128; + struct { + unsigned long low, high; + } i64_2; + } ret; + ret.i128 = __builtin_k1_acswapd(&loc, next, current); + printf("%lx %lx\n", ret.i64_2.low, ret.i64_2.high); +} |