diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2009-01-04 12:45:50 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2009-01-04 12:45:50 +0100 |
commit | 1a8c13b33ce1470d5a291063a5f5d0beebf421ee (patch) | |
tree | 8d6ea6df137e3fd50276c47a375137a6827044f7 /gcc/config/sparc | |
parent | 3aa37f1e673090a0e4efc81f7e6b92a6b329c2c6 (diff) | |
download | gcc-1a8c13b33ce1470d5a291063a5f5d0beebf421ee.zip gcc-1a8c13b33ce1470d5a291063a5f5d0beebf421ee.tar.gz gcc-1a8c13b33ce1470d5a291063a5f5d0beebf421ee.tar.bz2 |
s390.md (UNSPEC_MB): Rename from UNSPECV_MB.
* config/s390/s390.md (UNSPEC_MB): Rename from UNSPECV_MB.
(memory_barrier): Expand as unspec instead of unspec_volatile.
Remove mem:BLK from insn operands. Use Pmode scratch register.
(*memory_barrier): Define as unspec instead of unspec_volatile.
Use (match_dup 0) as input operand.
* config/sparc/sparc.md (UNSPEC_MEMBAR): Rename from UNSPECV_MEMBAR.
* config/sparc/sync.md (memory_barrier): Expand as unspec instead of
unspec_volatile. Remove mem:BLK from insn operands. Use Pmode
scratch register. Remove operand 1.
(*stbar): Define as unspec instead of unspec_volatile.
Use (match_dup 0) as input operand, remove (const_int 8).
(*membar): Define as unspec instead of unspec_volatile.
Use (match_dup 0) as input operand, remove input operand 2.
* config/xtensa/xtensa.md (UNSPEC_MEMW): Rename from UNSPECV_MEMW.
(memory_barrier): Expand as unspec instead of unspec_volatile.
Remove mem:BLK from insn operands. Use Pmode scratch register.
(*memory_barrier): Define as unspec instead of unspec_volatile.
Use (match_dup 0) as input operand.
* config/ia64/sync.md (memory_barrier): Redefine as expander pattern.
Remove mem:BLK from insn operands. Use Pmode scratch register.
Set volatile flag on operand 0.
(*memory_barrier): New insn pattern.
* config/rs6000/sync.md (memory_barrier): Remove mem:BLK from
insn operands.
(*memory_barrier): Use (match_dup 0) as input operand.
* config/mips/sync.md (memory_barrier): Redefine as expander pattern.
Remove mem:BLK from insn operands. Use Pmode scratch register.
Set volatile flag on operand 0.
(*memory_barrier): New insn pattern.
* config/alpha/sync.md (*memory_barrier): Rename from *mb_internal.
From-SVN: r143047
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r-- | gcc/config/sparc/sparc.md | 3 | ||||
-rw-r--r-- | gcc/config/sparc/sync.md | 24 |
2 files changed, 10 insertions, 17 deletions
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index 0a82e89..a3eb01f 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -38,6 +38,8 @@ (UNSPEC_EMB_TEXTULO 15) (UNSPEC_EMB_SETHM 18) + (UNSPEC_MEMBAR 20) + (UNSPEC_TLSGD 30) (UNSPEC_TLSLDM 31) (UNSPEC_TLSLDO 32) @@ -68,7 +70,6 @@ (UNSPECV_FLUSH 4) (UNSPECV_SETJMP 5) (UNSPECV_SAVEW 6) - (UNSPECV_MEMBAR 7) (UNSPECV_CAS 8) (UNSPECV_SWAP 9) (UNSPECV_LDSTUB 10) diff --git a/gcc/config/sparc/sync.md b/gcc/config/sparc/sync.md index 17cf691..f1444d8 100644 --- a/gcc/config/sparc/sync.md +++ b/gcc/config/sparc/sync.md @@ -24,36 +24,28 @@ (define_mode_attr modesuffix [(SI "") (DI "x")]) (define_expand "memory_barrier" - [(set (mem:BLK (match_dup 0)) - (unspec_volatile:BLK [(mem:BLK (match_dup 0)) (match_dup 1)] - UNSPECV_MEMBAR))] + [(set (match_dup 0) + (unspec:BLK [(match_dup 0)] UNSPEC_MEMBAR))] "TARGET_V8 || TARGET_V9" { - operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (DImode)); + operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); MEM_VOLATILE_P (operands[0]) = 1; - if (TARGET_V9) - /* member #StoreStore | #LoadStore | #StoreLoad | #LoadLoad */ - operands[1] = GEN_INT (15); - else - /* stbar */ - operands[1] = GEN_INT (8); + }) (define_insn "*stbar" [(set (match_operand:BLK 0 "" "") - (unspec_volatile:BLK [(match_operand:BLK 1 "" "") - (const_int 8)] UNSPECV_MEMBAR))] + (unspec:BLK [(match_dup 0)] UNSPEC_MEMBAR))] "TARGET_V8" "stbar" [(set_attr "type" "multi")]) +;; membar #StoreStore | #LoadStore | #StoreLoad | #LoadLoad (define_insn "*membar" [(set (match_operand:BLK 0 "" "") - (unspec_volatile:BLK [(match_operand:BLK 1 "" "") - (match_operand:SI 2 "immediate_operand" "I")] - UNSPECV_MEMBAR))] + (unspec:BLK [(match_dup 0)] UNSPEC_MEMBAR))] "TARGET_V9" - "membar\t%2" + "membar\t15" [(set_attr "type" "multi")]) (define_expand "sync_compare_and_swap<mode>" |