+2003-07-15 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/mips/mips.md (define_attr type): Add condmove. Use it for
+ the conditional move patterns.
+ * config/mips/5400.md (ir_vr54_move): Rename to ir_vr54_condmove.
+ Check for condmove type.
+ (ir_vr54_arith): Add move type.
+ * config/mips/5500.md (ir_vr55_move, ir_vr55_arith): Likewise.
+ * config/mips/sr71k.md (ir_sr70_move, ir_sr70_arith): Likewise.
+
2003-07-15 Neil Booth <neil@daikokuya.co.uk>
* c-opts.c (print_help): Remove.
;; This reservation is for conditional move based on integer
-;; or floating point CC. This could probably use some refinement
-;; as "move" type attr seems to be overloaded in rtl.
-(define_insn_reservation "ir_vr54_move" 4
+;; or floating point CC.
+(define_insn_reservation "ir_vr54_condmove" 4
(and (eq_attr "cpu" "r5400")
- (eq_attr "type" "move"))
+ (eq_attr "type" "condmove"))
"vr54_dp0|vr54_dp1")
;; Move to/from FPU registers
(define_insn_reservation "ir_vr54_arith" 1
(and (eq_attr "cpu" "r5400")
- (eq_attr "type" "arith,darith,const,icmp,nop"))
+ (eq_attr "type" "move,arith,darith,const,icmp,nop"))
"vr54_dp0|vr54_dp1")
(define_insn_reservation "ir_vr54_imul_si" 3
"vr55_mem")
;; This reservation is for conditional move based on integer
-;; or floating point CC. This could probably use some refinement
-;; as "move" type attr seems to be overloaded in rtl.
-(define_insn_reservation "ir_vr55_move" 2
+;; or floating point CC.
+(define_insn_reservation "ir_vr55_condmove" 2
(and (eq_attr "cpu" "r5500")
- (eq_attr "type" "move"))
+ (eq_attr "type" "condmove"))
"vr55_dp0|vr55_dp1")
;; Move to/from FPU registers
(define_insn_reservation "ir_vr55_arith" 1
(and (eq_attr "cpu" "r5500")
- (eq_attr "type" "arith,darith,const,icmp,nop"))
+ (eq_attr "type" "move,arith,darith,const,icmp,nop"))
"vr55_dp0|vr55_dp1")
(define_insn_reservation "ir_vr55_imul_si" 3
;; store store instruction(s)
;; prefetch memory prefetch
;; move data movement within same register set
+;; condmove conditional moves
;; xfer transfer to/from coprocessor
;; hilo transfer of hi/lo registers
;; arith integer arithmetic instruction
;; multi multiword sequence (or user asm statements)
;; nop no operation
(define_attr "type"
- "unknown,branch,jump,call,load,store,prefetch,move,xfer,hilo,const,arith,darith,imul,imadd,idiv,icmp,fadd,fmul,fmadd,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,frsqrt,multi,nop"
+ "unknown,branch,jump,call,load,store,prefetch,move,condmove,xfer,hilo,const,arith,darith,imul,imadd,idiv,icmp,fadd,fmul,fmadd,fdiv,fabs,fneg,fcmp,fcvt,fsqrt,frsqrt,multi,nop"
(cond [(eq_attr "jal" "!unset")
(const_string "call")]
(const_string "unknown")))
"@
mov%B4\\t%0,%z2,%1
mov%b4\\t%0,%z3,%1"
- [(set_attr "type" "move")
+ [(set_attr "type" "condmove")
(set_attr "mode" "SI")])
(define_insn ""
"@
mov%B4\\t%0,%z2,%1
mov%b4\\t%0,%z3,%1"
- [(set_attr "type" "move")
+ [(set_attr "type" "condmove")
(set_attr "mode" "SI")])
(define_insn ""
"@
mov%T3\\t%0,%z1,%4
mov%t3\\t%0,%z2,%4"
- [(set_attr "type" "move")
+ [(set_attr "type" "condmove")
(set_attr "mode" "SI")])
(define_insn ""
"@
mov%B4\\t%0,%z2,%1
mov%b4\\t%0,%z3,%1"
- [(set_attr "type" "move")
+ [(set_attr "type" "condmove")
(set_attr "mode" "DI")])
(define_insn ""
"@
mov%B4\\t%0,%z2,%1
mov%b4\\t%0,%z3,%1"
- [(set_attr "type" "move")
+ [(set_attr "type" "condmove")
(set_attr "mode" "DI")])
(define_insn ""
"@
mov%T3\\t%0,%z1,%4
mov%t3\\t%0,%z2,%4"
- [(set_attr "type" "move")
+ [(set_attr "type" "condmove")
(set_attr "mode" "DI")])
(define_insn ""
"@
mov%B4.s\\t%0,%2,%1
mov%b4.s\\t%0,%3,%1"
- [(set_attr "type" "move")
+ [(set_attr "type" "condmove")
(set_attr "mode" "SF")])
(define_insn ""
"@
mov%B4.s\\t%0,%2,%1
mov%b4.s\\t%0,%3,%1"
- [(set_attr "type" "move")
+ [(set_attr "type" "condmove")
(set_attr "mode" "SF")])
(define_insn ""
"@
mov%T3.s\\t%0,%1,%4
mov%t3.s\\t%0,%2,%4"
- [(set_attr "type" "move")
+ [(set_attr "type" "condmove")
(set_attr "mode" "SF")])
(define_insn ""
"@
mov%B4.d\\t%0,%2,%1
mov%b4.d\\t%0,%3,%1"
- [(set_attr "type" "move")
+ [(set_attr "type" "condmove")
(set_attr "mode" "DF")])
(define_insn ""
"@
mov%B4.d\\t%0,%2,%1
mov%b4.d\\t%0,%3,%1"
- [(set_attr "type" "move")
+ [(set_attr "type" "condmove")
(set_attr "mode" "DF")])
(define_insn ""
"@
mov%T3.d\\t%0,%1,%4
mov%t3.d\\t%0,%2,%4"
- [(set_attr "type" "move")
+ [(set_attr "type" "condmove")
(set_attr "mode" "DF")])
;; These are the main define_expand's used to make conditional moves.
;; This reservation is for conditional move based on integer
-;; or floating point CC. This could probably use some refinement
-;; as "move" type attr seems to be overloaded in rtl.
-(define_insn_reservation "ir_sr70_move"
+;; or floating point CC.
+(define_insn_reservation "ir_sr70_condmove"
4
(and (eq_attr "cpu" "sr71000")
- (eq_attr "type" "move"))
+ (eq_attr "type" "condmove"))
"ri_insns")
;; Try to discriminate move-from-cp1 versus move-to-cp1 as latencies
(define_insn_reservation "ir_sr70_arith"
1
(and (eq_attr "cpu" "sr71000")
- (eq_attr "type" "arith,darith,const"))
+ (eq_attr "type" "move,arith,darith,const"))
"ri_insns")
;; emulate repeat (dispatch stall) by spending extra cycle(s) in