Commit ba652ba9 by Eric Botcazou Committed by Eric Botcazou

sparc.md (cmove splitter): Fix formatting.

	* config/sparc/sparc.md (cmove splitter): Fix formatting.
	(conditional_trap expander): Reject inappropriate CCmodes.
	(conditional trap expander): Use V9 syntax if possible.

From-SVN: r87894
parent b1247df7
2004-09-22 Eric Botcazou <ebotcazou@libertysurf.fr>
* config/sparc/sparc.md (cmove splitter): Fix formatting.
(conditional_trap expander): Reject inappropriate CCmodes.
(conditional trap expander): Use V9 syntax if possible.
2004-09-22 Joseph S. Myers <jsm@polyomino.org.uk> 2004-09-22 Joseph S. Myers <jsm@polyomino.org.uk>
PR c/16566 PR c/16566
......
...@@ -1209,9 +1209,10 @@ ...@@ -1209,9 +1209,10 @@
(match_operator:SI 2 "noov_compare_op" (match_operator:SI 2 "noov_compare_op"
[(match_operand 1 "icc_or_fcc_reg_operand" "") [(match_operand 1 "icc_or_fcc_reg_operand" "")
(const_int 0)]))] (const_int 0)]))]
;; 32 bit LTU/GEU are better implemented using addx/subx "TARGET_V9
"TARGET_V9 && REGNO (operands[1]) == SPARC_ICC_REG && REGNO (operands[1]) == SPARC_ICC_REG
&& (GET_MODE (operands[1]) == CCXmode && (GET_MODE (operands[1]) == CCXmode
/* 32 bit LTU/GEU are better implemented using addx/subx. */
|| (GET_CODE (operands[2]) != LTU && GET_CODE (operands[2]) != GEU))" || (GET_CODE (operands[2]) != LTU && GET_CODE (operands[2]) != GEU))"
[(set (match_dup 0) (const_int 0)) [(set (match_dup 0) (const_int 0))
(set (match_dup 0) (set (match_dup 0)
...@@ -8222,19 +8223,25 @@ ...@@ -8222,19 +8223,25 @@
[(set_attr "type" "trap")]) [(set_attr "type" "trap")])
(define_expand "conditional_trap" (define_expand "conditional_trap"
[(trap_if (match_operator 0 "noov_compare_op" [(trap_if (match_operator 0 "noov_compare_op" [(match_dup 2) (match_dup 3)])
[(match_dup 2) (match_dup 3)])
(match_operand:SI 1 "arith_operand" ""))] (match_operand:SI 1 "arith_operand" ""))]
"" ""
"operands[2] = gen_compare_reg (GET_CODE (operands[0]), "operands[2] = gen_compare_reg (GET_CODE (operands[0]),
sparc_compare_op0, sparc_compare_op1); sparc_compare_op0, sparc_compare_op1);
if (GET_MODE (operands[2]) != CCmode && GET_MODE (operands[2]) != CCXmode)
FAIL;
operands[3] = const0_rtx;") operands[3] = const0_rtx;")
(define_insn "" (define_insn ""
[(trap_if (match_operator 0 "noov_compare_op" [(reg:CC 100) (const_int 0)]) [(trap_if (match_operator 0 "noov_compare_op" [(reg:CC 100) (const_int 0)])
(match_operand:SI 1 "arith_operand" "rM"))] (match_operand:SI 1 "arith_operand" "rM"))]
"" ""
"t%C0\t%1" {
if (TARGET_V9)
return "t%C0\t%%icc, %1";
else
return "t%C0\t%1";
}
[(set_attr "type" "trap")]) [(set_attr "type" "trap")])
(define_insn "" (define_insn ""
......
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