aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-10-09 06:12:17 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-10-10 05:28:19 -0700
commit16664e6e4fb4281be6477c13989740d44c963c77 (patch)
treed4c675f04d2b09bb757cdb1052d01c3517517748
parent02cbd79e4728319e0887ad7783297853b527bb13 (diff)
downloadgcc-16664e6e4fb4281be6477c13989740d44c963c77.zip
gcc-16664e6e4fb4281be6477c13989740d44c963c77.tar.gz
gcc-16664e6e4fb4281be6477c13989740d44c963c77.tar.bz2
x86-64: Check CMPXCHG16B for x86-64-v[234]
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.
-rw-r--r--gcc/testsuite/gcc.target/i386/x86-64-v2.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/x86-64-v3.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/x86-64-v4.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/x86-64-v2.c b/gcc/testsuite/gcc.target/i386/x86-64-v2.c
index 0f3df36..f17a15d 100644
--- a/gcc/testsuite/gcc.target/i386/x86-64-v2.c
+++ b/gcc/testsuite/gcc.target/i386/x86-64-v2.c
@@ -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
diff --git a/gcc/testsuite/gcc.target/i386/x86-64-v3.c b/gcc/testsuite/gcc.target/i386/x86-64-v3.c
index 16a94b180..784202f 100644
--- a/gcc/testsuite/gcc.target/i386/x86-64-v3.c
+++ b/gcc/testsuite/gcc.target/i386/x86-64-v3.c
@@ -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
diff --git a/gcc/testsuite/gcc.target/i386/x86-64-v4.c b/gcc/testsuite/gcc.target/i386/x86-64-v4.c
index 48e928c..7c202a4 100644
--- a/gcc/testsuite/gcc.target/i386/x86-64-v4.c
+++ b/gcc/testsuite/gcc.target/i386/x86-64-v4.c
@@ -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