]> gcc.gnu.org Git - gcc.git/commitdiff
x86-64: Check CMPXCHG16B for x86-64-v[234]
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 9 Oct 2020 13:12:17 +0000 (06:12 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 10 Oct 2020 12:28:19 +0000 (05:28 -0700)
x86-64-v2 includes CMPXCHG16B.  Since -mcx16 enables CMPXCHG16B and
defines __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16, check it in x86-64-v[234]
tests.

PR target/97250
* gcc.target/i386/x86-64-v2.c: Verify that
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 is defined.
* gcc.target/i386/x86-64-v3.c: Likewise.
* gcc.target/i386/x86-64-v4.c: Likewise.

gcc/testsuite/gcc.target/i386/x86-64-v2.c
gcc/testsuite/gcc.target/i386/x86-64-v3.c
gcc/testsuite/gcc.target/i386/x86-64-v4.c

index 0f3df3605b503a08cd12de7f6ff0c3d372aa7356..f17a15de9b6a2227ac126033cacc239e7423eb74 100644 (file)
@@ -12,6 +12,9 @@
 #ifndef __SSE2__
 # error __SSE2__ not defined
 #endif
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
+# error __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 not defined
+#endif
 #ifndef __LAHF_SAHF__
 # error __LAHF_SAHF__ not defined
 #endif
index 16a94b1802157756978ea1449fe75d3060bab866..784202fb26f3817ac4941e5f9723267cf7bd21c0 100644 (file)
@@ -12,6 +12,9 @@
 #ifndef __SSE2__
 # error __SSE2__ not defined
 #endif
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
+# error __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 not defined
+#endif
 #ifndef __LAHF_SAHF__
 # error __LAHF_SAHF__ not defined
 #endif
index 48e928c2955204449d70aca5dbb66c9f201d3aa0..7c202a42068b73785fdf1121658f32e6e8f7431b 100644 (file)
@@ -12,6 +12,9 @@
 #ifndef __SSE2__
 # error __SSE2__ not defined
 #endif
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
+# error __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 not defined
+#endif
 #ifndef __LAHF_SAHF__
 # error __LAHF_SAHF__ not defined
 #endif
This page took 0.085267 seconds and 5 git commands to generate.