diff options
author | Geoffrey Keating <geoffk@geoffk.org> | 2005-06-01 00:45:24 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@geoffk.org> | 2005-06-01 00:45:24 +0000 |
commit | 994fa4c581df1d0c2b43e4f9992445e2ca2c0800 (patch) | |
tree | 03c489c612650d4829919ca9551af6bcb76c3f2b /gcc/config/rs6000/rs6000.md | |
parent | 211a2310d214fa2cb759bee0cdbd2f652536d452 (diff) |
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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@100418 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/rs6000.md')
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 02847df7c2f..53e4884b4b2 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -14868,6 +14868,23 @@ "<larx> %3,%y0\n\t%q4 %2,%1,%3\n\t<stcx> %2,%y0\n\tbne- $-12" [(set_attr "length" "16")]) +; This pattern could also take immediate values of operand 1, +; since the non-NOT version of the operator is used; but this is not +; very useful, since in practise operand 1 is a full 32-bit value. +; Likewise, operand 5 is in practise either <= 2^16 or it is a register. +(define_insn "*sync_boolcshort_internal" + [(set (match_operand:SI 2 "gpc_reg_operand" "=&r") + (match_operator:SI 4 "boolean_operator" + [(xor:SI (match_operand:SI 0 "memory_operand" "+Z") + (match_operand:SI 5 "logical_operand" "rK")) + (match_operand:SI 1 "gpc_reg_operand" "r")])) + (set (match_operand:SI 3 "gpc_reg_operand" "=&b") (match_dup 0)) + (set (match_dup 0) (unspec:SI [(match_dup 4)] UNSPEC_SYNC_OP)) + (clobber (match_scratch:CC 6 "=&x"))] + "TARGET_POWERPC" + "lwarx %3,%y0\n\txor%I2 %2,%3,%5\n\t%q4 %2,%2,%1\n\tstwcx. %2,%y0\n\tbne- $-16" + [(set_attr "length" "20")]) + (define_insn "*sync_boolc<mode>_internal2" [(set (match_operand:GPR 2 "gpc_reg_operand" "=&r") (match_operator:GPR 4 "boolean_operator" |