summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/i386.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/i386.exp')
-rw-r--r--gcc/testsuite/gcc.target/i386/i386.exp12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp
index 785a9739236..37f43a60f05 100644
--- a/gcc/testsuite/gcc.target/i386/i386.exp
+++ b/gcc/testsuite/gcc.target/i386/i386.exp
@@ -243,6 +243,18 @@ proc check_effective_target_bmi2 { } {
} "-mbmi2" ]
}
+# Return 1 if ADX instructions can be compiled.
+proc check_effective_target_adx { } {
+ return [check_no_compiler_messages adx object {
+ unsigned char
+ _adxcarry_u32 (unsigned char __CF, unsigned int __X,
+ unsigned int __Y, unsigned int *__P)
+ {
+ return __builtin_ia32_addcarryx_u32 (__CF, __X, __Y, __P);
+ }
+ } "-madx" ]
+}
+
# Return 1 if rtm instructions can be compiled.
proc check_effective_target_rtm { } {
return [check_no_compiler_messages rtm object {