(const_string "v850e3v5")]
(const_string "none")))
-;; Condition code settings.
-;; none - insn does not affect cc
-;; none_0hit - insn does not affect cc but it does modify operand 0
-;; This attribute is used to keep track of when operand 0 changes.
-;; See the description of NOTICE_UPDATE_CC for more info.
-;; set_znv - sets z,n,v to usable values; c is unknown.
-;; set_zn - sets z,n to usable values; v,c is unknown.
-;; compare - compare instruction
-;; clobber - value of cc is unknown
-(define_attr "cc" "none,none_0hit,set_z,set_zn,set_znv,compare,clobber"
- (const_string "clobber"))
\f
;; Function units for the V850. As best as I can tell, there's
;; a traditional memory load/use stall as well as a stall if
(match_operand 2 "disp23_operand" "W")))))]
"TARGET_V850E2V3_UP"
"ld.b %2[%1],%0"
- [(set_attr "length" "4")
- (set_attr "cc" "none_0hit")])
+ [(set_attr "length" "4")])
(define_insn "unsign23byte_load"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand 2 "disp23_operand" "W")))))]
"TARGET_V850E2V3_UP"
"ld.bu %2[%1],%0"
- [(set_attr "length" "4")
- (set_attr "cc" "none_0hit")])
+ [(set_attr "length" "4")])
(define_insn "sign23hword_load"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand 2 "disp23_operand" "W")))))]
"TARGET_V850E2V3_UP"
"ld.h %2[%1],%0"
- [(set_attr "length" "4")
- (set_attr "cc" "none_0hit")])
+ [(set_attr "length" "4")])
(define_insn "unsign23hword_load"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand 2 "disp23_operand" "W")))))]
"TARGET_V850E2V3_UP"
"ld.hu %2[%1],%0"
- [(set_attr "length" "4")
- (set_attr "cc" "none_0hit")])
+ [(set_attr "length" "4")])
(define_insn "23word_load"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand 2 "disp23_operand" "W"))))]
"TARGET_V850E2V3_UP"
"ld.w %2[%1],%0"
- [(set_attr "length" "4")
- (set_attr "cc" "none_0hit")])
+ [(set_attr "length" "4")])
(define_insn "23byte_store"
[(set (mem:QI (plus:SI (match_operand:SI 0 "register_operand" "r")
(match_operand:QI 2 "register_operand" "r"))]
"TARGET_V850E2V3_UP"
"st.b %2,%1[%0]"
- [(set_attr "length" "4")
- (set_attr "cc" "none_0hit")])
+ [(set_attr "length" "4")])
(define_insn "23hword_store"
[(set (mem:HI (plus:SI (match_operand:SI 0 "register_operand" "r")
(match_operand:HI 2 "register_operand" "r"))]
"TARGET_V850E2V3_UP"
"st.h %2,%1[%0]"
- [(set_attr "length" "4")
- (set_attr "cc" "none_0hit")])
+ [(set_attr "length" "4")])
(define_insn "23word_store"
[(set (mem:SI (plus:SI (match_operand:SI 0 "register_operand" "r")
(match_operand:SI 2 "register_operand" "r"))]
"TARGET_V850E2V3_UP"
"st.w %2,%1[%0]"
- [(set_attr "length" "4")
- (set_attr "cc" "none_0hit")])
+ [(set_attr "length" "4")])
;; movdi
|| (register_operand (operands[0], DImode) && register_operand (operands[1], DImode))"
{ return v850_gen_movdi (operands); }
[(set_attr "length" "4,12,12")
- (set_attr "cc" "none_0hit")
- (set_attr "type" "other,load,store")]
-)
+ (set_attr "type" "other,load,store")])
;; movqi
return output_move_single (operands);
}
[(set_attr "length" "2,4,2,2,4,4,4")
- (set_attr "cc" "none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")
(set_attr "type" "other,other,load,other,load,store,store")])
;; movhi
return output_move_single (operands);
}
[(set_attr "length" "2,4,2,2,4,4,4")
- (set_attr "cc" "none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")
(set_attr "type" "other,other,load,other,load,store,store")])
;; movsi and helpers
""
"movhi hi(%1),%.,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "other")])
(define_insn "*movsi_lo"
""
"movea lo(%2),%1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "other")])
(define_expand "movsi"
return output_move_single (operands);
}
[(set_attr "length" "2,4,4,2,2,4,4,4,4,6")
- (set_attr "cc" "none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")
(set_attr "type" "other,other,other,load,other,load,other,store,store,other")])
(define_insn "*movsi_internal"
return output_move_single (operands);
}
[(set_attr "length" "2,4,4,2,2,4,4,4,4")
- (set_attr "cc" "none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")
(set_attr "type" "other,other,other,load,other,load,store,store,other")])
(define_insn "*movsf_internal"
return output_move_single (operands);
}
[(set_attr "length" "2,4,4,8,2,2,4,4,4,8")
- (set_attr "cc" "none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")
(set_attr "type" "other,other,other,other,load,other,load,store,store,other")])
;; ----------------------------------------------------------------------
(const_int 0)))]
""
"tst1 %1,%0"
- [(set_attr "length" "4")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "4")])
;; This replaces ld.b;sar;andi with tst1;setf nz.
"@
cmp %1,%0
cmp %1,%0"
- [(set_attr "length" "2,2")
- (set_attr "cc" "compare")])
+ [(set_attr "length" "2,2")])
(define_expand "cbranchsf4"
[(set (pc)
gcc_unreachable ();
}
[(set_attr "length" "12")
- (set_attr "type" "fpu")]
-)
+ (set_attr "type" "fpu")])
(define_expand "cbranchdf4"
[(set (pc)
gcc_unreachable ();
}
[(set_attr "length" "12")
- (set_attr "type" "fpu")]
-)
+ (set_attr "type" "fpu")])
(define_expand "cmpsf"
[(set (reg:CC CC_REGNUM)
add %2,%0
addi %2,%1,%0
addi %O2(%P2),%1,%0"
- [(set_attr "length" "2,4,4")
- (set_attr "cc" "set_zn,set_zn,set_zn")])
+ [(set_attr "length" "2,4,4")])
;; ----------------------------------------------------------------------
;; SUBTRACT INSTRUCTIONS
"@
sub %2,%0
subr %1,%0"
- [(set_attr "length" "2,2")
- (set_attr "cc" "set_zn,set_zn")])
+ [(set_attr "length" "2,2")])
(define_insn "negsi2"
[(set (match_operand:SI 0 "register_operand" "=r")
(clobber (reg:CC CC_REGNUM))]
""
"subr %.,%0"
- [(set_attr "length" "2")
- (set_attr "cc" "set_zn")])
+ [(set_attr "length" "2")])
;; ----------------------------------------------------------------------
;; MULTIPLY INSTRUCTIONS
""
"mulh %2,%0"
[(set_attr "length" "2")
- (set_attr "cc" "none_0hit")
(set_attr "type" "mult")])
(define_insn "mulhisi3_internal2"
mulh %2,%0
mulhi %2,%1,%0"
[(set_attr "length" "2,4")
- (set_attr "cc" "none_0hit,none_0hit")
(set_attr "type" "mult")])
;; ??? The scheduling info is probably wrong.
"(TARGET_V850E_UP)"
"mul %2,%1,%."
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "mult")])
;; ----------------------------------------------------------------------
return "div %2,%0,%3";
}
[(set_attr "length" "4")
- (set_attr "cc" "clobber")
(set_attr "type" "div")])
(define_insn "udivmodsi4"
return "divu %2,%0,%3";
}
[(set_attr "length" "4")
- (set_attr "cc" "clobber")
(set_attr "type" "div")])
;; ??? There is a 2 byte instruction for generating only the quotient.
"TARGET_V850E_UP"
"sxh %0\n\tdivh %2,%0,%3"
[(set_attr "length" "6")
- (set_attr "cc" "clobber")
(set_attr "type" "div")])
;; The half word needs to be zero/sign extended to 32 bits before doing
"TARGET_V850E_UP"
"zxh %0\n\tdivhu %2,%0,%3"
[(set_attr "length" "6")
- (set_attr "cc" "clobber")
(set_attr "type" "div")])
\f
;; ----------------------------------------------------------------------
return "";
}
[(set_attr "length" "4")
- (set_attr "cc" "clobber")
(set_attr "type" "bit1")])
(define_insn "*v850_clr1_2"
return "";
}
[(set_attr "length" "4")
- (set_attr "cc" "clobber")
(set_attr "type" "bit1")])
(define_insn "*v850_clr1_3"
return "";
}
[(set_attr "length" "4")
- (set_attr "cc" "clobber")
(set_attr "type" "bit1")])
(define_insn "andsi3"
and %2,%0
and %.,%0
andi %2,%1,%0"
- [(set_attr "length" "2,2,4")
- (set_attr "cc" "set_zn")])
+ [(set_attr "length" "2,2,4")])
;; ----------------------------------------------------------------------
;; OR INSTRUCTIONS
""
"set1 %M1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "clobber")
(set_attr "type" "bit1")])
(define_insn "*v850_set1_2"
return "";
}
[(set_attr "length" "4")
- (set_attr "cc" "clobber")
(set_attr "type" "bit1")])
(define_insn "*v850_set1_3"
return "";
}
[(set_attr "length" "4")
- (set_attr "cc" "clobber")
(set_attr "type" "bit1")])
(define_insn "iorsi3"
or %2,%0
or %.,%0
ori %2,%1,%0"
- [(set_attr "length" "2,2,4")
- (set_attr "cc" "set_zn")])
+ [(set_attr "length" "2,2,4")])
;; ----------------------------------------------------------------------
;; XOR INSTRUCTIONS
""
"not1 %M1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "clobber")
(set_attr "type" "bit1")])
(define_insn "*v850_not1_2"
return "";
}
[(set_attr "length" "4")
- (set_attr "cc" "clobber")
(set_attr "type" "bit1")])
(define_insn "*v850_not1_3"
return "";
}
[(set_attr "length" "4")
- (set_attr "cc" "clobber")
(set_attr "type" "bit1")])
(define_insn "xorsi3"
xor %2,%0
xor %.,%0
xori %2,%1,%0"
- [(set_attr "length" "2,2,4")
- (set_attr "cc" "set_zn")])
+ [(set_attr "length" "2,2,4")])
\f
;; ----------------------------------------------------------------------
;; NOT INSTRUCTIONS
(clobber (reg:CC CC_REGNUM))]
""
"not %1,%0"
- [(set_attr "length" "2")
- (set_attr "cc" "set_zn")])
+ [(set_attr "length" "2")])
;; -----------------------------------------------------------------
;; BIT FIELDS
(match_operand:SI 3 "register_operand" "r"))]
"TARGET_V850E3V5_UP"
"bins %3, %2, %1, %0"
- [(set_attr "length" "4")
- (set_attr "cc" "set_zn")]
-)
+ [(set_attr "length" "4")])
;; -----------------------------------------------------------------
;; Scc INSTRUCTIONS
(match_operator:SI 1 "comparison_operator"
[(cc0) (const_int 0)]))]
""
-{
- if ((cc_status.flags & CC_OVERFLOW_UNUSABLE) != 0
- && (GET_CODE (operands[1]) == GT
- || GET_CODE (operands[1]) == GE
- || GET_CODE (operands[1]) == LE
- || GET_CODE (operands[1]) == LT))
- return 0;
-
- return "setf %c1,%0";
-}
- [(set_attr "length" "4")
- (set_attr "cc" "none_0hit")])
+ "setf %c1,%0"
+ [(set_attr "length" "4")])
(define_insn "setf_insn"
[(set (match_operand:SI 0 "register_operand" "=r")
[(reg:CC CC_REGNUM) (const_int 0)]))]
""
"setf %b1,%0"
- [(set_attr "length" "4")
- (set_attr "cc" "none_0hit")])
+ [(set_attr "length" "4")])
(define_insn "set_z_insn"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand 1 "v850_float_z_comparison_operator" ""))]
"TARGET_V850E2V3_UP"
"setf z,%0"
- [(set_attr "length" "4")
- (set_attr "cc" "none_0hit")])
+ [(set_attr "length" "4")])
(define_insn "set_nz_insn"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand 1 "v850_float_nz_comparison_operator" ""))]
"TARGET_V850E2V3_UP"
"setf nz,%0"
- [(set_attr "length" "4")
- (set_attr "cc" "none_0hit")])
+ [(set_attr "length" "4")])
;; ----------------------------------------------------------------------
;; CONDITIONAL MOVE INSTRUCTIONS
(match_operand:SI 3 "reg_or_0_operand" "rI")))]
"(TARGET_V850E_UP)"
"cmov %c1,%2,%z3,%0";
- [(set_attr "length" "6")
- (set_attr "cc" "compare")])
+ [(set_attr "length" "6")])
(define_insn "movsicc_reversed_cc"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand:SI 3 "reg_or_int5_operand" "rJ")))]
"(TARGET_V850E_UP)"
"cmov %C1,%3,%z2,%0"
- [(set_attr "length" "6")
- (set_attr "cc" "compare")])
+ [(set_attr "length" "6")])
(define_insn "*movsicc_normal"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand:SI 3 "reg_or_0_operand" "rI")))]
"(TARGET_V850E_UP)"
"cmp %5,%4 ; cmov %c1,%2,%z3,%0"
- [(set_attr "length" "6")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "6")])
(define_insn "*movsicc_reversed"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand:SI 3 "reg_or_int5_operand" "rJ")))]
"(TARGET_V850E_UP)"
"cmp %5,%4 ; cmov %C1,%3,%z2,%0"
- [(set_attr "length" "6")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "6")])
(define_insn "*movsicc_tst1"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand:SI 5 "reg_or_0_operand" "rI")))]
"(TARGET_V850E_UP)"
"tst1 %3,%2 ; cmov %c1,%4,%z5,%0"
- [(set_attr "length" "8")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "8")])
(define_insn "*movsicc_tst1_reversed"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand:SI 5 "reg_or_int5_operand" "rJ")))]
"(TARGET_V850E_UP)"
"tst1 %3,%2 ; cmov %C1,%5,%z4,%0"
- [(set_attr "length" "8")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "8")])
;; Matching for sasf requires combining 4 instructions, so we provide a
;; dummy pattern to match the first 3, which will always be turned into the
(clobber (reg:CC CC_REGNUM))]
"(TARGET_V850E_UP)"
"cmp %4,%3 ; sasf %c1,%0"
- [(set_attr "length" "6")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "6")])
(define_split
[(set (match_operand:SI 0 "register_operand" "")
(clobber (reg:CC CC_REGNUM))]
"(TARGET_V850E_UP)"
"bsh %1,%0"
- [(set_attr "length" "4")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "4")])
(define_expand "rotlsi3"
[(parallel [(set (match_operand:SI 0 "register_operand" "")
(match_operand:SI 3 "const_int_operand" "n"))]))]
"TARGET_V850E3V5_UP && (INTVAL (operands[2]) + INTVAL (operands[3]) == 32)"
"rotl %2, %1, %0"
- [(set_attr "length" "4")
- (set_attr "cc" "set_zn")]
-)
+ [(set_attr "length" "4")])
(define_insn "rotlsi3_b"
[(set (match_operand:SI 0 "register_operand" "=r")
(match_operand:SI 2 "const_int_operand" "n"))]))]
"TARGET_V850E3V5_UP && (INTVAL (operands[2]) + INTVAL (operands[3]) == 32)"
"rotl %2, %1, %0"
- [(set_attr "length" "4")
- (set_attr "cc" "set_zn")]
-)
+ [(set_attr "length" "4")])
(define_insn "rotlsi3_v850e3v5"
[(set (match_operand:SI 0 "register_operand" "=r")
(clobber (reg:CC CC_REGNUM))]
"TARGET_V850E3V5_UP"
"rotl %2, %1, %0"
- [(set_attr "length" "4")
- (set_attr "cc" "set_zn")]
-)
+ [(set_attr "length" "4")])
(define_insn "*rotlsi3_16"
[(set (match_operand:SI 0 "register_operand" "=r")
(clobber (reg:CC CC_REGNUM))]
"(TARGET_V850E_UP)"
"hsw %1,%0"
- [(set_attr "length" "4")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "4")])
;; ----------------------------------------------------------------------
;; JUMP INSTRUCTIONS
default: gcc_unreachable ();
}
}
- [(set_attr "length" "2,6")
- (set_attr "cc" "none")]
-)
+ [(set_attr "length" "2,6")])
(define_expand "doloop_end"
[(use (match_operand 0 "" "")) ; loop pseudo
(if_then_else (lt (abs (minus (match_dup 0) (pc)))
(const_int 65534))
(const_int 4)
- (const_int 14)))
- (set_attr "cc" "none")])
+ (const_int 14)))])
;; Conditional jump instructions
(pc)))]
""
{
- if ((cc_status.flags & CC_OVERFLOW_UNUSABLE) != 0
- && (GET_CODE (operands[1]) == GT
- || GET_CODE (operands[1]) == GE
- || GET_CODE (operands[1]) == LE
- || GET_CODE (operands[1]) == LT))
- return 0;
-
if (get_attr_length (insn) == 2)
return "b%b1 %l0";
if (TARGET_V850E3V5_UP && get_attr_length (insn) == 4)
(if_then_else (lt (abs (minus (match_dup 0) (pc)))
(const_int 65536))
(const_int 4)
- (const_int 6))))
- (set_attr "cc" "none")])
+ (const_int 6))))])
(define_insn "*branch_invert"
[(set (pc)
(label_ref (match_operand 0 "" ""))))]
""
{
- if ((cc_status.flags & CC_OVERFLOW_UNUSABLE) != 0
- && (GET_CODE (operands[1]) == GT
- || GET_CODE (operands[1]) == GE
- || GET_CODE (operands[1]) == LE
- || GET_CODE (operands[1]) == LT))
- return NULL;
-
if (get_attr_length (insn) == 2)
return "b%B1 %l0";
(if_then_else (lt (abs (minus (match_dup 0) (pc)))
(const_int 65536))
(const_int 4)
- (const_int 6))))
- (set_attr "cc" "none")])
+ (const_int 6))))])
(define_insn "branch_z_normal"
[(set (pc)
(if_then_else (lt (abs (minus (match_dup 0) (pc)))
(const_int 65536))
(const_int 4)
- (const_int 6))))
- (set_attr "cc" "none")])
+ (const_int 6))))])
(define_insn "*branch_z_invert"
[(set (pc)
(if_then_else (lt (abs (minus (match_dup 0) (pc)))
(const_int 65536))
(const_int 4)
- (const_int 6))))
- (set_attr "cc" "none")])
+ (const_int 6))))])
(define_insn "branch_nz_normal"
[(set (pc)
(if_then_else (lt (abs (minus (match_dup 0) (pc)))
(const_int 65536))
(const_int 4)
- (const_int 6))))
- (set_attr "cc" "none")])
+ (const_int 6))))])
(define_insn "*branch_nz_invert"
[(set (pc)
(if_then_else (lt (abs (minus (match_dup 0) (pc)))
(const_int 65536))
(const_int 4)
- (const_int 6))))
- (set_attr "cc" "none")])
+ (const_int 6))))])
;; Unconditional and other jump instructions.
(if_then_else (lt (abs (minus (match_dup 0) (pc)))
(const_int 256))
(const_int 2)
- (const_int 4)))
- (set_attr "cc" "none")])
+ (const_int 4)))])
(define_insn "indirect_jump"
[(set (pc) (match_operand:SI 0 "register_operand" "r"))]
""
"jmp %0"
- [(set_attr "length" "2")
- (set_attr "cc" "none")])
+ [(set_attr "length" "2")])
(define_insn "tablejump"
[(set (pc) (match_operand:SI 0 "register_operand" "r"))
(use (label_ref (match_operand 1 "" "")))]
""
"jmp %0"
- [(set_attr "length" "2")
- (set_attr "cc" "none")])
+ [(set_attr "length" "2")])
(define_insn "switch"
[(set (pc)
(label_ref (match_dup 1))))]
"(TARGET_V850E_UP)"
"switch %0"
- [(set_attr "length" "2")
- (set_attr "cc" "none")])
+ [(set_attr "length" "2")])
(define_expand "casesi"
[(match_operand:SI 0 "register_operand" "")
return "jarl %0, r31";
}
- [(set_attr "length" "4,8")
- (set_attr "cc" "clobber,clobber")]
-)
+ [(set_attr "length" "4,8")])
(define_insn "call_internal_long"
[(call (mem:QI (match_operand:SI 0 "call_address_operand" "S,r"))
return "jarl .+4,r31 ; add 4,r31 ; jmp %0";
}
- [(set_attr "length" "16,8")
- (set_attr "cc" "clobber,clobber")]
-)
+ [(set_attr "length" "16,8")])
;; Call subroutine, returning value in operand 0
;; (which must be a hard register).
return "jarl %1, r31";
}
- [(set_attr "length" "4,8")
- (set_attr "cc" "clobber,clobber")]
-)
+ [(set_attr "length" "4,8")])
(define_insn "call_value_internal_long"
[(set (match_operand 0 "" "=r,r")
return "jarl .+4, r31 ; add 4, r31 ; jmp %1";
}
- [(set_attr "length" "16,8")
- (set_attr "cc" "clobber,clobber")]
-)
+ [(set_attr "length" "16,8")])
(define_insn "nop"
[(const_int 0)]
""
"nop"
- [(set_attr "length" "2")
- (set_attr "cc" "none")])
+ [(set_attr "length" "2")])
\f
;; ----------------------------------------------------------------------
;; EXTEND INSTRUCTIONS
andi 65535,%1,%0
sld.hu %1,%0
ld.hu %1,%0"
- [(set_attr "length" "2,4,2,4")
- (set_attr "cc" "none_0hit,set_zn,none_0hit,none_0hit")])
+ [(set_attr "length" "2,4,2,4")])
(define_insn "*zero_extendhisi2_v850"
[(set (match_operand:SI 0 "register_operand" "=r")
(clobber (reg:CC CC_REGNUM))] ;; A lie, but we have to match the expander
""
"andi 65535,%1,%0"
- [(set_attr "length" "4")
- (set_attr "cc" "set_zn")])
+ [(set_attr "length" "4")])
(define_expand "zero_extendhisi2"
[(parallel [(set (match_operand:SI 0 "register_operand")
andi 255,%1,%0
sld.bu %1,%0
ld.bu %1,%0"
- [(set_attr "length" "2,4,2,4")
- (set_attr "cc" "none_0hit,set_zn,none_0hit,none_0hit")])
+ [(set_attr "length" "2,4,2,4")])
(define_insn "*zero_extendqisi2_v850"
[(set (match_operand:SI 0 "register_operand" "=r")
(clobber (reg:CC CC_REGNUM))] ;; A lie, but we have to match the expander
""
"andi 255,%1,%0"
- [(set_attr "length" "4")
- (set_attr "cc" "set_zn")])
+ [(set_attr "length" "4")])
(define_expand "zero_extendqisi2"
[(parallel [(set (match_operand:SI 0 "register_operand")
sxh %0
sld.h %1,%0
ld.h %1,%0"
- [(set_attr "length" "2,2,4")
- (set_attr "cc" "none_0hit,none_0hit,none_0hit")])
+ [(set_attr "length" "2,2,4")])
;; ??? This is missing a sign extend from memory pattern to match the ld.h
;; instruction.
sxb %0
sld.b %1,%0
ld.b %1,%0"
- [(set_attr "length" "2,2,4")
- (set_attr "cc" "none_0hit,none_0hit,none_0hit")])
+ [(set_attr "length" "2,2,4")])
;; ??? This is missing a sign extend from memory pattern to match the ld.b
;; instruction.
"@
shl %2,%0
shl %2,%0"
- [(set_attr "length" "4,2")
- (set_attr "cc" "set_zn")])
+ [(set_attr "length" "4,2")])
(define_insn "ashlsi3_v850e2"
[(set (match_operand:SI 0 "register_operand" "=r")
(clobber (reg:CC CC_REGNUM))]
"TARGET_V850E2_UP"
"shl %2,%1,%0"
- [(set_attr "length" "4")
- (set_attr "cc" "set_znv")])
+ [(set_attr "length" "4")])
(define_insn "lshrsi3"
[(set (match_operand:SI 0 "register_operand" "=r,r")
"@
shr %2,%0
shr %2,%0"
- [(set_attr "length" "4,2")
- (set_attr "cc" "set_zn")])
+ [(set_attr "length" "4,2")])
(define_insn "lshrsi3_v850e2"
[(set (match_operand:SI 0 "register_operand" "=r")
(clobber (reg:CC CC_REGNUM))]
"TARGET_V850E2_UP"
"shr %2,%1,%0"
- [(set_attr "length" "4")
- (set_attr "cc" "set_zn")])
+ [(set_attr "length" "4")])
(define_insn "ashrsi3"
[(set (match_operand:SI 0 "register_operand" "=r,r")
"@
sar %2,%0
sar %2,%0"
- [(set_attr "length" "4,2")
- (set_attr "cc" "set_zn, set_zn")])
+ [(set_attr "length" "4,2")])
(define_insn "ashrsi3_v850e2"
[(set (match_operand:SI 0 "register_operand" "=r")
(clobber (reg:CC CC_REGNUM))]
"TARGET_V850E2_UP"
"sar %2,%1,%0"
- [(set_attr "length" "4")
- (set_attr "cc" "set_zn")])
+ [(set_attr "length" "4")])
;; ----------------------------------------------------------------------
;; FIND FIRST BIT INSTRUCTION
(clobber (reg:CC CC_REGNUM))]
"TARGET_V850E2_UP"
"sch1r %1,%0"
- [(set_attr "length" "4")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "4")])
;; ----------------------------------------------------------------------
;; PROLOGUE/EPILOGUE
[(return)]
"reload_completed"
"jmp [r31]"
- [(set_attr "length" "2")
- (set_attr "cc" "none")])
+ [(set_attr "length" "2")])
(define_insn "return_internal"
[(return)
(use (reg:SI 31))]
""
"jmp [r31]"
- [(set_attr "length" "2")
- (set_attr "cc" "none")])
+ [(set_attr "length" "2")])
;; ----------------------------------------------------------------------
;; v850e2V3 floating-point hardware support
"TARGET_USE_FPU"
"addf.s %1,%2,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "adddf3"
"TARGET_USE_FPU"
"addf.d %1,%2,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "subsf3"
"TARGET_USE_FPU"
"subf.s %2,%1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "subdf3"
"TARGET_USE_FPU"
"subf.d %2,%1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "mulsf3"
"TARGET_USE_FPU"
"mulf.s %1,%2,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "muldf3"
"TARGET_USE_FPU"
"mulf.d %1,%2,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "divsf3"
"TARGET_USE_FPU"
"divf.s %2,%1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "divdf3"
"TARGET_USE_FPU"
"divf.d %2,%1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "minsf3"
"TARGET_USE_FPU"
"minf.s %z1,%z2,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "mindf3"
"TARGET_USE_FPU"
"minf.d %1,%2,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "maxsf3"
"TARGET_USE_FPU"
"maxf.s %z1,%z2,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "maxdf3"
"TARGET_USE_FPU"
"maxf.d %1,%2,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "abssf2"
"TARGET_USE_FPU"
"absf.s %1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "absdf2"
"TARGET_USE_FPU"
"absf.d %1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "negsf2"
"TARGET_USE_FPU"
"negf.s %1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "negdf2"
"TARGET_USE_FPU"
"negf.d %1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
;; square-root
"TARGET_USE_FPU"
"sqrtf.s %1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "sqrtdf2"
"TARGET_USE_FPU"
"sqrtf.d %1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
;; float -> int
"TARGET_USE_FPU"
"trncf.sw %1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "fixuns_truncsfsi2"
"TARGET_USE_FPU"
"trncf.suw %1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
- (set_attr "type" "fpu")]
-)
+ (set_attr "type" "fpu")])
(define_insn "fix_truncdfsi2"
[(set (match_operand:SI 0 "register_operand" "=r")
"TARGET_USE_FPU"
"trncf.dw %1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "fixuns_truncdfsi2"
"TARGET_USE_FPU"
"trncf.duw %1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
- (set_attr "type" "fpu")]
-)
+ (set_attr "type" "fpu")])
(define_insn "fix_truncsfdi2"
[(set (match_operand:DI 0 "register_operand" "=r")
"TARGET_USE_FPU"
"trncf.sl %1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "fixuns_truncsfdi2"
"TARGET_USE_FPU"
"trncf.sul %1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
- (set_attr "type" "fpu")]
-)
+ (set_attr "type" "fpu")])
(define_insn "fix_truncdfdi2"
[(set (match_operand:DI 0 "register_operand" "=r")
"TARGET_USE_FPU"
"trncf.dl %1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "fixuns_truncdfdi2"
"TARGET_USE_FPU"
"trncf.dul %1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
- (set_attr "type" "fpu")]
-)
+ (set_attr "type" "fpu")])
;; int -> float
(define_insn "floatsisf2"
"TARGET_USE_FPU"
"cvtf.ws %z1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "unsfloatsisf2"
"TARGET_USE_FPU"
"cvtf.uws %z1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "floatsidf2"
"TARGET_USE_FPU"
"cvtf.wd %z1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "unsfloatsidf2"
"TARGET_USE_FPU"
"cvtf.uwd %z1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "floatdisf2"
"TARGET_USE_FPU"
"cvtf.ls %z1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "unsfloatdisf2"
"TARGET_USE_FPU"
"cvtf.uls %z1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "floatdidf2"
"TARGET_USE_FPU"
"cvtf.ld %z1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "unsfloatdidf2"
"TARGET_USE_FPU"
"cvtf.uld %z1, %0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
;; single-float -> double-float
"TARGET_USE_FPU"
"cvtf.sd %z1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
;; double-float -> single-float
"TARGET_USE_FPU"
"cvtf.ds %1,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
;;
"TARGET_USE_FPU"
"recipf.s %2,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_expand "recipdf2"
"TARGET_USE_FPU"
"recipf.d %2,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
;;; reciprocal of square-root
"TARGET_USE_FPU"
"rsqrtf.s %2,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_expand "rsqrtdf2"
"TARGET_USE_FPU"
"rsqrtf.d %2,%0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
;; Note: The FPU-2.0 (ie pre e3v5) versions of these routines do not actually
"TARGET_USE_FPU"
{ return TARGET_V850E3V5_UP ? "fmaf.s %1, %2, %0" : "maddf.s %2, %1, %3, %0"; }
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
;;; multiply-subtract
"TARGET_USE_FPU"
{ return TARGET_V850E3V5_UP ? "fmsf.s %1, %2, %0" : "msubf.s %2, %1, %3, %0"; }
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
;;; negative-multiply-add
"TARGET_USE_FPU"
{ return TARGET_V850E3V5_UP ? "fnmaf.s %1, %2, %0" : "nmaddf.s %2, %1, %3, %0"; }
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
;; negative-multiply-subtract
"TARGET_USE_FPU"
{ return TARGET_V850E3V5_UP ? "fnmsf.s %1, %2, %0" : "nmsubf.s %2, %1, %3, %0"; }
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
;
; ---------------- comparison/conditionals
"TARGET_USE_FPU"
"cmpf.s le, %z0, %z1"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "cmpsf_lt_insn"
"TARGET_USE_FPU"
"cmpf.s lt, %z0, %z1"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "cmpsf_ge_insn"
"TARGET_USE_FPU"
"cmpf.s le, %z1, %z0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "cmpsf_gt_insn"
"TARGET_USE_FPU"
"cmpf.s lt, %z1, %z0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "cmpsf_eq_insn"
"TARGET_USE_FPU"
"cmpf.s eq, %z0, %z1"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
; DF
"TARGET_USE_FPU"
"cmpf.d le, %z0, %z1"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "cmpdf_lt_insn"
"TARGET_USE_FPU"
"cmpf.d lt, %z0, %z1"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "cmpdf_ge_insn"
"TARGET_USE_FPU"
"cmpf.d le, %z1, %z0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "cmpdf_gt_insn"
"TARGET_USE_FPU"
"cmpf.d lt, %z1, %z0"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
(define_insn "cmpdf_eq_insn"
"TARGET_USE_FPU"
"cmpf.d eq, %z0, %z1"
[(set_attr "length" "4")
- (set_attr "cc" "none_0hit")
(set_attr "type" "fpu")])
;;
|| GET_MODE(operands[0]) == CC_FPU_NEmode)"
"trfsr"
[(set_attr "length" "4")
- (set_attr "cc" "set_z")
(set_attr "type" "fpu")])
;;
(match_operand:SF 1 "reg_or_0_operand" "rIG")
(match_operand:SF 2 "reg_or_0_operand" "rIG")))]
"TARGET_USE_FPU"
- "cmovf.s 0,%z1,%z2,%0"
- [(set_attr "cc" "clobber")]) ;; ??? or none_0hit
+ "cmovf.s 0,%z1,%z2,%0")
(define_insn "movsfcc_nz_insn"
[(set (match_operand:SF 0 "register_operand" "=r")
(match_operand:SF 1 "reg_or_0_operand" "rIG")
(match_operand:SF 2 "reg_or_0_operand" "rIG")))]
"TARGET_USE_FPU"
- "cmovf.s 0,%z2,%z1,%0"
- [(set_attr "cc" "clobber")]) ;; ??? or none_0hit
+ "cmovf.s 0,%z2,%z1,%0")
(define_insn "movdfcc_z_insn"
[(set (match_operand:DF 0 "even_reg_operand" "=r")
(match_operand:DF 1 "even_reg_operand" "r")
(match_operand:DF 2 "even_reg_operand" "r")))]
"TARGET_USE_FPU"
- "cmovf.d 0,%z1,%z2,%0"
- [(set_attr "cc" "clobber")]) ;; ??? or none_0hit
+ "cmovf.d 0,%z1,%z2,%0")
(define_insn "movdfcc_nz_insn"
[(set (match_operand:DF 0 "even_reg_operand" "=r")
(match_operand:DF 1 "even_reg_operand" "r")
(match_operand:DF 2 "even_reg_operand" "r")))]
"TARGET_USE_FPU"
- "cmovf.d 0,%z2,%z1,%0"
- [(set_attr "cc" "clobber")]) ;; ??? or none_0hit
+ "cmovf.d 0,%z2,%z1,%0")
(define_insn "movedfcc_z_zero"
[(set (match_operand:DF 0 "register_operand" "=r")
(match_operand:DF 2 "reg_or_0_operand" "rIG")))]
"TARGET_USE_FPU"
"cmovf.s 0,%z1,%z2,%0 ; cmovf.s 0,%Z1,%Z2,%R0"
- [(set_attr "length" "8")
- (set_attr "cc" "clobber")]) ;; ??? or none_0hit
+ [(set_attr "length" "8")])
(define_insn "movedfcc_nz_zero"
[(set (match_operand:DF 0 "register_operand" "=r")
(match_operand:DF 2 "reg_or_0_operand" "rIG")))]
"TARGET_USE_FPU"
"cmovf.s 0,%z2,%z1,%0 ; cmovf.s 0,%Z2,%Z1,%R0"
- [(set_attr "length" "8")
- (set_attr "cc" "clobber")]) ;; ??? or none_0hit
+ [(set_attr "length" "8")])
;; ----------------------------------------------------------------------
{
return construct_prepare_instruction (operands[0]);
}
- [(set_attr "length" "4")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "4")])
(define_insn ""
[(match_parallel 0 "pattern_is_ok_for_prologue"
}
[(set (attr "length") (if_then_else (eq_attr "long_calls" "yes")
(const_string "16")
- (const_string "4")))
- (set_attr "cc" "clobber")])
+ (const_string "4")))])
;;
;; Actually, turn the RTXs into a DISPOSE instruction.
{
return construct_dispose_instruction (operands[0]);
}
- [(set_attr "length" "4")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "4")])
;; This pattern will match a return RTX followed by any number of pop RTXs
;; and possible a stack adjustment as well. These RTXs will be turned into
}
[(set (attr "length") (if_then_else (eq_attr "long_calls" "yes")
(const_string "12")
- (const_string "4")))
- (set_attr "cc" "clobber")])
+ (const_string "4")))])
;; Initialize an interrupt function. Do not depend on TARGET_PROLOG_FUNCTION.
(define_insn "callt_save_interrupt"
output_asm_insn ("callt ctoff(__callt_save_interrupt)", operands);
return "";
}
- [(set_attr "length" "26")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "26")])
(define_insn "callt_return_interrupt"
[(unspec_volatile [(const_int 0)] 3)]
"(TARGET_V850E_UP) && !TARGET_DISABLE_CALLT"
"callt ctoff(__callt_return_interrupt)"
- [(set_attr "length" "2")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "2")])
(define_insn "save_interrupt"
[(set (reg:SI 3) (plus:SI (reg:SI 3) (const_int -20)))
[(set (attr "length")
(if_then_else (match_test "TARGET_LONG_CALLS")
(const_int 10)
- (const_int 34)))
- (set_attr "cc" "clobber")])
+ (const_int 34)))])
;; Restore r1, r4, r10, and return from the interrupt
(define_insn "return_interrupt"
[(set (attr "length")
(if_then_else (match_test "TARGET_LONG_CALLS")
(const_int 4)
- (const_int 24)))
- (set_attr "cc" "clobber")])
+ (const_int 24)))])
;; Save all registers except for the registers saved in save_interrupt when
;; an interrupt function makes a call.
[(unspec_volatile [(const_int 0)] 0)]
"(TARGET_V850E_UP) && !TARGET_DISABLE_CALLT"
"callt ctoff(__callt_save_all_interrupt)"
- [(set_attr "length" "2")
- (set_attr "cc" "none")])
+ [(set_attr "length" "2")])
(define_insn "save_all_interrupt"
[(unspec_volatile [(const_int 0)] 0)]
[(set (attr "length")
(if_then_else (match_test "TARGET_LONG_CALLS")
(const_int 4)
- (const_int 62)
- ))
- (set_attr "cc" "clobber")])
+ (const_int 62)))])
(define_insn "_save_all_interrupt"
[(unspec_volatile [(const_int 0)] 0)]
"TARGET_V850 && ! TARGET_LONG_CALLS"
"jarl __save_all_interrupt,r10"
- [(set_attr "length" "4")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "4")])
;; Restore all registers saved when an interrupt function makes a call.
;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and
[(unspec_volatile [(const_int 0)] 1)]
"(TARGET_V850E_UP) && !TARGET_DISABLE_CALLT"
"callt ctoff(__callt_restore_all_interrupt)"
- [(set_attr "length" "2")
- (set_attr "cc" "none")])
+ [(set_attr "length" "2")])
(define_insn "restore_all_interrupt"
[(unspec_volatile [(const_int 0)] 1)]
(if_then_else (match_test "TARGET_LONG_CALLS")
(const_int 4)
(const_int 62)
- ))
- (set_attr "cc" "clobber")])
+ ))])
(define_insn "_restore_all_interrupt"
[(unspec_volatile [(const_int 0)] 1)]
"TARGET_V850 && ! TARGET_LONG_CALLS"
"jarl __restore_all_interrupt,r10"
- [(set_attr "length" "4")
- (set_attr "cc" "clobber")])
+ [(set_attr "length" "4")])