Commit 8a015216 by Stan Cox

(sgt,sgtu,sge,sle,bgt,blt,bge,ble): Use CC_FCOM

From-SVN: r13103
parent fc2380b9
...@@ -5065,7 +5065,8 @@ ...@@ -5065,7 +5065,8 @@
"" ""
"* "*
{ {
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE) if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387)
&& ! (cc_prev_status.flags & CC_FCOMI))
return AS1 (sete,%0); return AS1 (sete,%0);
OUTPUT_JUMP (\"setg %0\", \"seta %0\", NULL_PTR); OUTPUT_JUMP (\"setg %0\", \"seta %0\", NULL_PTR);
...@@ -5097,7 +5098,8 @@ ...@@ -5097,7 +5098,8 @@
"" ""
"* "*
{ {
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE) if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387)
&& ! (cc_prev_status.flags & CC_FCOMI))
return AS1 (sete,%0); return AS1 (sete,%0);
OUTPUT_JUMP (\"setl %0\", \"setb %0\", \"sets %0\"); OUTPUT_JUMP (\"setl %0\", \"setb %0\", \"sets %0\");
...@@ -5129,7 +5131,8 @@ ...@@ -5129,7 +5131,8 @@
"" ""
"* "*
{ {
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE) if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387)
&& ! (cc_prev_status.flags & CC_FCOMI))
return AS1 (sete,%0); return AS1 (sete,%0);
OUTPUT_JUMP (\"setge %0\", \"setae %0\", \"setns %0\"); OUTPUT_JUMP (\"setge %0\", \"setae %0\", \"setns %0\");
...@@ -5161,7 +5164,8 @@ ...@@ -5161,7 +5164,8 @@
"" ""
"* "*
{ {
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE) if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387)
&& ! (cc_prev_status.flags & CC_FCOMI))
return AS1 (setb,%0); return AS1 (setb,%0);
OUTPUT_JUMP (\"setle %0\", \"setbe %0\", NULL_PTR); OUTPUT_JUMP (\"setle %0\", \"setbe %0\", NULL_PTR);
...@@ -5285,7 +5289,8 @@ ...@@ -5285,7 +5289,8 @@
"" ""
"* "*
{ {
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE) if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387)
&& ! (cc_prev_status.flags & CC_FCOMI))
return AS1 (je,%l0); return AS1 (je,%l0);
if (cc_prev_status.flags & CC_TEST_AX) if (cc_prev_status.flags & CC_TEST_AX)
...@@ -5336,7 +5341,8 @@ ...@@ -5336,7 +5341,8 @@
"" ""
"* "*
{ {
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE) if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387)
&& ! (cc_prev_status.flags & CC_FCOMI))
return AS1 (je,%l0); return AS1 (je,%l0);
if (cc_prev_status.flags & CC_TEST_AX) if (cc_prev_status.flags & CC_TEST_AX)
...@@ -5387,7 +5393,8 @@ ...@@ -5387,7 +5393,8 @@
"" ""
"* "*
{ {
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE) if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387)
&& ! (cc_prev_status.flags & CC_FCOMI))
return AS1 (je,%l0); return AS1 (je,%l0);
if (cc_prev_status.flags & CC_TEST_AX) if (cc_prev_status.flags & CC_TEST_AX)
{ {
...@@ -5437,7 +5444,8 @@ ...@@ -5437,7 +5444,8 @@
"" ""
"* "*
{ {
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE) if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387)
&& ! (cc_prev_status.flags & CC_FCOMI))
return AS1 (jb,%l0); return AS1 (jb,%l0);
if (cc_prev_status.flags & CC_TEST_AX) if (cc_prev_status.flags & CC_TEST_AX)
{ {
...@@ -5524,7 +5532,8 @@ ...@@ -5524,7 +5532,8 @@
"" ""
"* "*
{ {
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE) if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387)
&& ! (cc_prev_status.flags & CC_FCOMI))
return AS1 (jne,%l0); return AS1 (jne,%l0);
if (cc_prev_status.flags & CC_TEST_AX) if (cc_prev_status.flags & CC_TEST_AX)
{ {
...@@ -5554,7 +5563,8 @@ ...@@ -5554,7 +5563,8 @@
"" ""
"* "*
{ {
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE) if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387)
&& ! (cc_prev_status.flags & CC_FCOMI))
return AS1 (jne,%l0); return AS1 (jne,%l0);
if (cc_prev_status.flags & CC_TEST_AX) if (cc_prev_status.flags & CC_TEST_AX)
{ {
...@@ -5585,7 +5595,8 @@ ...@@ -5585,7 +5595,8 @@
"" ""
"* "*
{ {
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE) if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387)
&& ! (cc_prev_status.flags & CC_FCOMI))
return AS1 (jne,%l0); return AS1 (jne,%l0);
if (cc_prev_status.flags & CC_TEST_AX) if (cc_prev_status.flags & CC_TEST_AX)
{ {
...@@ -5615,7 +5626,8 @@ ...@@ -5615,7 +5626,8 @@
"" ""
"* "*
{ {
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE) if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387)
&& ! (cc_prev_status.flags & CC_FCOMI))
return AS1 (jae,%l0); return AS1 (jae,%l0);
if (cc_prev_status.flags & CC_TEST_AX) if (cc_prev_status.flags & CC_TEST_AX)
...@@ -6952,9 +6964,6 @@ ...@@ -6952,9 +6964,6 @@
"TARGET_CMOVE" "TARGET_CMOVE"
"* "*
{ {
if (cc_prev_status.flags & CC_IN_80387)
abort ();
if (which_alternative == 0) if (which_alternative == 0)
{ {
/* r <- cond ? arg : r */ /* r <- cond ? arg : r */
...@@ -6978,21 +6987,21 @@ ...@@ -6978,21 +6987,21 @@
if (! rtx_equal_p (operands[0], operands[2])) if (! rtx_equal_p (operands[0], operands[2]))
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[2]) == MEM) if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[2]) == MEM)
{ {
output_asm_insn (AS2 (mov%L2,%2,%4), operands); output_asm_insn (AS2 (mov%z2,%2,%4), operands);
output_asm_insn (AS2 (mov%L2,%4,%0), operands); output_asm_insn (AS2 (mov%z2,%4,%0), operands);
} }
else else
output_asm_insn (AS2 (mov%L0,%2,%0), operands); output_asm_insn (AS2 (mov%z0,%2,%0), operands);
if (! rtx_equal_p (operands[0], operands[3])) if (! rtx_equal_p (operands[0], operands[3]))
{ {
output_asm_insn (\"j%C1 %l5\", operands); output_asm_insn (\"j%C1 %l5\", operands);
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[3]) == MEM) if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[3]) == MEM)
{ {
output_asm_insn (AS2 (mov%L2,%3,%4), operands); output_asm_insn (AS2 (mov%z2,%3,%4), operands);
output_asm_insn (AS2 (mov%L2,%4,%0), operands); output_asm_insn (AS2 (mov%z2,%4,%0), operands);
} }
else else
output_asm_insn (AS2 (mov%L0,%3,%0), operands); output_asm_insn (AS2 (mov%z0,%3,%0), operands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[5])); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[5]));
} }
} }
...@@ -7009,9 +7018,6 @@ ...@@ -7009,9 +7018,6 @@
"TARGET_CMOVE" "TARGET_CMOVE"
"* "*
{ {
if (cc_prev_status.flags & CC_IN_80387)
abort ();
if (which_alternative == 0) if (which_alternative == 0)
{ {
/* r <- cond ? arg : r */ /* r <- cond ? arg : r */
...@@ -7035,21 +7041,21 @@ ...@@ -7035,21 +7041,21 @@
if (! rtx_equal_p (operands[0], operands[2])) if (! rtx_equal_p (operands[0], operands[2]))
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[2]) == MEM) if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[2]) == MEM)
{ {
output_asm_insn (AS2 (mov%L2,%2,%4), operands); output_asm_insn (AS2 (mov%z2,%2,%4), operands);
output_asm_insn (AS2 (mov%L2,%4,%0), operands); output_asm_insn (AS2 (mov%z2,%4,%0), operands);
} }
else else
output_asm_insn (AS2 (mov%L0,%2,%0), operands); output_asm_insn (AS2 (mov%z0,%2,%0), operands);
if (! rtx_equal_p (operands[0], operands[3])) if (! rtx_equal_p (operands[0], operands[3]))
{ {
output_asm_insn (\"j%C1 %l5\", operands); output_asm_insn (\"j%C1 %l5\", operands);
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[3]) == MEM) if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[3]) == MEM)
{ {
output_asm_insn (AS2 (mov%L2,%3,%4), operands); output_asm_insn (AS2 (mov%z2,%3,%4), operands);
output_asm_insn (AS2 (mov%L2,%4,%0), operands); output_asm_insn (AS2 (mov%z2,%4,%0), operands);
} }
else else
output_asm_insn (AS2 (mov%L0,%3,%0), operands); output_asm_insn (AS2 (mov%z0,%3,%0), operands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[5])); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[5]));
} }
} }
...@@ -7125,24 +7131,21 @@ ...@@ -7125,24 +7131,21 @@
operands[4] = gen_label_rtx (); operands[4] = gen_label_rtx ();
if (STACK_REG_P (operands[2]) || GET_CODE (operands[2]) == MEM) if (STACK_REG_P (operands[2]) || GET_CODE (operands[2]) == MEM)
output_asm_insn (AS1 (fld,%y2), operands); output_asm_insn (AS1 (fld%z2,%y2), operands);
else else
{ {
xops[0] = operands[0]; xops[0] = operands[0];
xops[1] = operands[2]; xops[1] = operands[2];
/* SET_SRC (PATTERN (insn)) = XEXP (SET_SRC (PATTERN (insn)), 1);*/ output_move_const_single (xops);
output_asm_insn (output_move_const_single (xops), xops);
} }
output_asm_insn (\"j%C1 %l4\", operands); output_asm_insn (\"j%C1 %l4\", operands);
if (STACK_REG_P (operands[3]) || GET_CODE (operands[0]) == MEM) if (STACK_REG_P (operands[3]) || GET_CODE (operands[0]) == MEM)
output_asm_insn (AS1 (fld,%y3), operands); output_asm_insn (AS1 (fld%z3,%y3), operands);
else else
{ {
xops[1] = operands[3]; xops[1] = operands[3];
SET_SRC (PATTERN (insn)) = XEXP (SET_SRC (PATTERN (insn)), 2); SET_SRC (PATTERN (insn)) = XEXP (SET_SRC (PATTERN (insn)), 2);
output_asm_insn (output_move_const_single (xops), xops); output_move_const_single (xops);
/* output_move_memory (xops, insn, GET_MODE_SIZE (DFmode), 2, 4);*/
/* output_asm_insn (AS1 (fld%z0,%y3), operands);*/
} }
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[4])); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[4]));
} }
...@@ -7150,11 +7153,11 @@ ...@@ -7150,11 +7153,11 @@
}") }")
(define_insn "movdfcc_1" (define_insn "movdfcc_1"
[(set (match_operand:DF 0 "register_operand" "=t,t") [(set (match_operand:DF 0 "general_operand" "=t,=t,f,fFm")
(if_then_else:DF (match_operator 1 "comparison_operator" (if_then_else:DF (match_operator 1 "comparison_operator"
[(cc0) (const_int 0)]) [(cc0) (const_int 0)])
(match_operand:DF 2 "register_operand" "0,f") (match_operand:DF 2 "general_operand" "0,f,f,fFm")
(match_operand:DF 3 "register_operand" "f,0")))] (match_operand:DF 3 "general_operand" "f,0,f,fFm")))]
"TARGET_CMOVE" "TARGET_CMOVE"
"* "*
{ {
...@@ -7168,6 +7171,38 @@ ...@@ -7168,6 +7171,38 @@
/* r <- cond ? r : arg */ /* r <- cond ? r : arg */
output_asm_insn (AS2 (fcmov%F1,%2,%0), operands); output_asm_insn (AS2 (fcmov%F1,%2,%0), operands);
} }
else if (which_alternative == 2)
{
/* r <- cond ? r : arg */
output_asm_insn (AS2 (fcmov%F1,%2,%0), operands);
output_asm_insn (AS2 (fcmov%f1,%3,%0), operands);
}
else if (which_alternative == 3)
{
rtx xops[2];
/* r <- cond ? arg1 : arg2 */
operands[4] = gen_label_rtx ();
if (STACK_REG_P (operands[2]) || GET_CODE (operands[2]) == MEM)
output_asm_insn (AS1 (fld%z2,%y2), operands);
else
{
xops[0] = operands[0];
xops[1] = operands[2];
output_move_const_single (xops);
}
output_asm_insn (\"j%C1 %l4\", operands);
if (STACK_REG_P (operands[3]) || GET_CODE (operands[0]) == MEM)
output_asm_insn (AS1 (fld%z3,%y3), operands);
else
{
xops[1] = operands[3];
SET_SRC (PATTERN (insn)) = XEXP (SET_SRC (PATTERN (insn)), 2);
output_move_const_single (xops);
}
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[4]));
}
RET; RET;
}") }")
......
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