aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@gcc.gnu.org>2005-06-02 21:45:57 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2005-06-02 21:45:57 +0000
commitbc0f348e1004ac1092b08ff0cfd82dd40abb67e7 (patch)
tree99ae9ea1708821e17b29de920210967f403c9914 /gcc
parente2089d725e78e1a3b34fc3051ad6c804659bc362 (diff)
downloadgcc-bc0f348e1004ac1092b08ff0cfd82dd40abb67e7.zip
gcc-bc0f348e1004ac1092b08ff0cfd82dd40abb67e7.tar.gz
gcc-bc0f348e1004ac1092b08ff0cfd82dd40abb67e7.tar.bz2
Index: ChangeLog
2005-05-31 Geoffrey Keating <geoffk@geoffk.org> * config/rs6000/rs6000.md (sync_boolcshort_internal): New. * config/rs6000/rs6000.c (rs6000_emit_sync): Shift count must be complemented for big-endian. Mask for AND must be rotated, not shifted. Handle short operands with NOT on the memory operation. Index: testsuite/ChangeLog 2005-05-31 Geoffrey Keating <geoffk@geoffk.org> * lib/target-supports.exp (check_effective_target_sync_char_short): New. * gcc.dg/sync-2.c: New. From-SVN: r100515
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/lib/target-supports.exp23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index ac6dda5..b2bec15 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -990,6 +990,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