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.exp25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 881f849..d80da69 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -6222,6 +6222,31 @@ proc check_effective_target_unaligned_stack { } {
return $et_unaligned_stack_saved
}
+# Return 1 if the target plus current options does not have
+# slow unaligned access when using word size accesses.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_word_mode_no_slow_unalign { } {
+ global et_word_mode_no_slow_unalign_saved
+ global et_index
+
+ if [info exists et_word_mode_no_slow_unalign_saved($et_index)] {
+ verbose "check_effective_target_word_mode_no_slow_unalign: \
+ using cached result" 2
+ } else {
+ set et_word_mode_no_slow_unalign_saved($et_index) 0
+ if { [is-effective-target non_strict_align]
+ && !([istarget arm*-*-*])
+ } {
+ set et_word_mode_no_slow_unalign_saved($et_index) 1
+ }
+ }
+ verbose "check_effective_target_word_mode_no_slow_unalign:\
+ returning $et_word_mode_no_slow_unalign_saved($et_index)" 2
+ return $et_word_mode_no_slow_unalign_saved($et_index)
+}
+
# Return 1 if the target plus current options does not support a vector
# alignment mechanism, 0 otherwise.
#