Commit 4b39813a by Richard Henderson Committed by Richard Henderson

spu: Use define_c_enum.

From-SVN: r177301
parent a6365e99
2011-08-03 Richard Henderson <rth@redhat.com> 2011-08-03 Richard Henderson <rth@redhat.com>
* config/spu/spu.md: Use define_c_enum instead of define_constants.
(UNSPECV_BLOCKAGE, UNSPECV_LNOP, UNSPECV_SYNC): Rename from UNSPEC_*.
(UNSPECV_NOP): New.
2011-08-03 Richard Henderson <rth@redhat.com>
PR target/34888 PR target/34888
* config/avr/avr.md: New splitter for REG_ARGS_SIZE 0. * config/avr/avr.md: New splitter for REG_ARGS_SIZE 0.
......
...@@ -101,58 +101,62 @@ ...@@ -101,58 +101,62 @@
(absence_set "pipe0" "pipe1") (absence_set "pipe0" "pipe1")
(define_constants [ (define_c_enum "unspec" [
(UNSPEC_BLOCKAGE 0) UNSPEC_IPREFETCH
(UNSPEC_IPREFETCH 1) UNSPEC_FREST
(UNSPEC_FREST 2) UNSPEC_FRSQEST
(UNSPEC_FRSQEST 3) UNSPEC_FI
(UNSPEC_FI 4) UNSPEC_EXTEND_CMP
(UNSPEC_EXTEND_CMP 5) UNSPEC_CG
(UNSPEC_CG 6) UNSPEC_CGX
(UNSPEC_CGX 7) UNSPEC_ADDX
(UNSPEC_ADDX 8) UNSPEC_BG
(UNSPEC_BG 9) UNSPEC_BGX
(UNSPEC_BGX 10) UNSPEC_SFX
(UNSPEC_SFX 11) UNSPEC_FSM
(UNSPEC_FSM 12) UNSPEC_HBR
(UNSPEC_HBR 13) UNSPEC_NOP
(UNSPEC_LNOP 14) UNSPEC_CONVERT
(UNSPEC_NOP 15) UNSPEC_SELB
(UNSPEC_CONVERT 16) UNSPEC_SHUFB
(UNSPEC_SELB 17) UNSPEC_CPAT
(UNSPEC_SHUFB 18) UNSPEC_CNTB
(UNSPEC_CPAT 19) UNSPEC_SUMB
(UNSPEC_SYNC 20) UNSPEC_FSMB
(UNSPEC_CNTB 21) UNSPEC_FSMH
(UNSPEC_SUMB 22) UNSPEC_GBB
(UNSPEC_FSMB 23) UNSPEC_GBH
(UNSPEC_FSMH 24) UNSPEC_GB
(UNSPEC_GBB 25) UNSPEC_AVGB
(UNSPEC_GBH 26) UNSPEC_ABSDB
(UNSPEC_GB 27) UNSPEC_ORX
(UNSPEC_AVGB 28) UNSPEC_HEQ
(UNSPEC_ABSDB 29) UNSPEC_HGT
(UNSPEC_ORX 30) UNSPEC_HLGT
(UNSPEC_HEQ 31) UNSPEC_STOP
(UNSPEC_HGT 32) UNSPEC_STOPD
(UNSPEC_HLGT 33) UNSPEC_SET_INTR
(UNSPEC_STOP 38) UNSPEC_FSCRRD
(UNSPEC_STOPD 39) UNSPEC_FSCRWR
(UNSPEC_SET_INTR 40) UNSPEC_MFSPR
(UNSPEC_FSCRRD 42) UNSPEC_MTSPR
(UNSPEC_FSCRWR 43) UNSPEC_RDCH
(UNSPEC_MFSPR 44) UNSPEC_RCHCNT
(UNSPEC_MTSPR 45) UNSPEC_WRCH
(UNSPEC_RDCH 46) UNSPEC_SPU_REALIGN_LOAD
(UNSPEC_RCHCNT 47) UNSPEC_SPU_MASK_FOR_LOAD
(UNSPEC_WRCH 48) UNSPEC_DFTSV
(UNSPEC_SPU_REALIGN_LOAD 49) UNSPEC_FLOAT_EXTEND
(UNSPEC_SPU_MASK_FOR_LOAD 50) UNSPEC_FLOAT_TRUNCATE
(UNSPEC_DFTSV 51) UNSPEC_SP_SET
(UNSPEC_FLOAT_EXTEND 52) UNSPEC_SP_TEST
(UNSPEC_FLOAT_TRUNCATE 53) ])
(UNSPEC_SP_SET 54)
(UNSPEC_SP_TEST 55) (define_c_enum "unspecv" [
UNSPECV_BLOCKAGE
UNSPECV_LNOP
UNSPECV_NOP
UNSPECV_SYNC
]) ])
(include "predicates.md") (include "predicates.md")
...@@ -4210,7 +4214,7 @@ selb\t%0,%4,%0,%3" ...@@ -4210,7 +4214,7 @@ selb\t%0,%4,%0,%3"
;; generated by the spu_expand_epilogue (taken from mips.md) ;; generated by the spu_expand_epilogue (taken from mips.md)
(define_insn "blockage" (define_insn "blockage"
[(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)] [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)]
"" ""
"" ""
[(set_attr "type" "convert") [(set_attr "type" "convert")
...@@ -4392,19 +4396,19 @@ selb\t%0,%4,%0,%3" ...@@ -4392,19 +4396,19 @@ selb\t%0,%4,%0,%3"
[(set_attr "type" "shuf")]) [(set_attr "type" "shuf")])
(define_insn "nop" (define_insn "nop"
[(unspec_volatile [(const_int 0)] UNSPEC_NOP)] [(unspec_volatile [(const_int 0)] UNSPECV_NOP)]
"" ""
"nop" "nop"
[(set_attr "type" "nop")]) [(set_attr "type" "nop")])
(define_insn "nopn" (define_insn "nopn"
[(unspec_volatile [(match_operand:SI 0 "immediate_operand" "K")] UNSPEC_NOP)] [(unspec_volatile [(match_operand:SI 0 "immediate_operand" "K")] UNSPECV_NOP)]
"" ""
"nop\t%0" "nop\t%0"
[(set_attr "type" "nop")]) [(set_attr "type" "nop")])
(define_insn "lnop" (define_insn "lnop"
[(unspec_volatile [(const_int 0)] UNSPEC_LNOP)] [(unspec_volatile [(const_int 0)] UNSPECV_LNOP)]
"" ""
"lnop" "lnop"
[(set_attr "type" "lnop")]) [(set_attr "type" "lnop")])
...@@ -4439,21 +4443,21 @@ selb\t%0,%4,%0,%3" ...@@ -4439,21 +4443,21 @@ selb\t%0,%4,%0,%3"
[(set_attr "type" "hbr")]) [(set_attr "type" "hbr")])
(define_insn "sync" (define_insn "sync"
[(unspec_volatile [(const_int 0)] UNSPEC_SYNC) [(unspec_volatile [(const_int 0)] UNSPECV_SYNC)
(clobber (mem:BLK (scratch)))] (clobber (mem:BLK (scratch)))]
"" ""
"sync" "sync"
[(set_attr "type" "br")]) [(set_attr "type" "br")])
(define_insn "syncc" (define_insn "syncc"
[(unspec_volatile [(const_int 1)] UNSPEC_SYNC) [(unspec_volatile [(const_int 1)] UNSPECV_SYNC)
(clobber (mem:BLK (scratch)))] (clobber (mem:BLK (scratch)))]
"" ""
"syncc" "syncc"
[(set_attr "type" "br")]) [(set_attr "type" "br")])
(define_insn "dsync" (define_insn "dsync"
[(unspec_volatile [(const_int 2)] UNSPEC_SYNC) [(unspec_volatile [(const_int 2)] UNSPECV_SYNC)
(clobber (mem:BLK (scratch)))] (clobber (mem:BLK (scratch)))]
"" ""
"dsync" "dsync"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment