aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/target-supports.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/lib/target-supports.exp')
-rw-r--r--gcc/testsuite/lib/target-supports.exp45
1 files changed, 45 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index ac6dda5fd57..3b98c6b2d0f 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -725,6 +725,28 @@ proc check_effective_target_lp64 { } {
return $et_lp64_saved
}
+# Return 1 if the target needs a command line argument to enable a SIMD
+# instruction set.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_vect_cmdline_needed { } {
+ global et_vect_cmdline_needed_saved
+
+ if [info exists et_vect_cmdline_needed_saved] {
+ verbose "check_effective_target_vect_cmdline_needed: using cached result" 2
+ } else {
+ set et_vect_cmdline_needed_saved 1
+ if { [istarget ia64-*-*]
+ || [istarget x86_64-*-*] } {
+ set et_vect_cmdline_needed_saved 0
+ }
+ }
+
+ verbose "check_effective_target_vect_cmdline_needed: returning $et_vect_cmdline_needed_saved" 2
+ return $et_vect_cmdline_needed_saved
+}
+
# Return 1 if the target supports hardware vectors of int, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
@@ -990,6 +1012,29 @@ proc check_effective_target_sync_int_long { } {
return $et_sync_int_long_saved
}
+# Return 1 if the target supports atomic operations on "char" and "short".
+
+proc check_effective_target_sync_char_short { } {
+ global et_sync_char_short_saved
+
+ if [info exists et_sync_char_short_saved] {
+ verbose "check_effective_target_sync_char_short: using cached result" 2
+ } else {
+ set et_sync_char_short_saved 0
+# This is intentionally powerpc but not rs6000, rs6000 doesn't have the
+# load-reserved/store-conditional instructions.
+ if { [istarget ia64-*-*]
+ || [istarget i?86-*-*]
+ || [istarget x86_64-*-*]
+ || [istarget powerpc*-*-*] } {
+ set et_sync_char_short_saved 1
+ }
+ }
+
+ verbose "check_effective_target_sync_char_short: returning $et_sync_char_short_saved" 2
+ return $et_sync_char_short_saved
+}
+
# Return 1 if the target matches the effective target 'arg', 0 otherwise.
# This can be used with any check_* proc that takes no argument and
# returns only 1 or 0. It could be used with check_* procs that take