Added TARGET_CMOVE check for fcomi.

(sgt+1,slt+1,sge+1,sle+1,bgt+1,blt+1,bge+1,ble+1,bleu+4)
Added TARGET_CMOVE check for fcomi.
(movsicc_1+1,movhicc_1+1): Added to handle the general case.

From-SVN: r12583
This commit is contained in:
Stan Cox 1996-08-02 21:27:07 +00:00
parent d773e01575
commit f8a5c113dd
1 changed files with 56 additions and 38 deletions

View File

@ -4960,7 +4960,7 @@
""
"*
{
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387))
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE)
return AS1 (sete,%0);
OUTPUT_JUMP (\"setg %0\", \"seta %0\", NULL_PTR);
@ -4992,7 +4992,7 @@
""
"*
{
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387))
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE)
return AS1 (sete,%0);
OUTPUT_JUMP (\"setl %0\", \"setb %0\", \"sets %0\");
@ -5024,7 +5024,7 @@
""
"*
{
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387))
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE)
return AS1 (sete,%0);
OUTPUT_JUMP (\"setge %0\", \"setae %0\", \"setns %0\");
@ -5056,7 +5056,7 @@
""
"*
{
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387))
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE)
return AS1 (setb,%0);
OUTPUT_JUMP (\"setle %0\", \"setbe %0\", NULL_PTR);
@ -5180,7 +5180,7 @@
""
"*
{
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387))
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE)
return AS1 (je,%l0);
if (cc_prev_status.flags & CC_TEST_AX)
@ -5231,7 +5231,7 @@
""
"*
{
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387))
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE)
return AS1 (je,%l0);
if (cc_prev_status.flags & CC_TEST_AX)
@ -5282,7 +5282,7 @@
""
"*
{
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387))
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE)
return AS1 (je,%l0);
if (cc_prev_status.flags & CC_TEST_AX)
{
@ -5332,7 +5332,7 @@
""
"*
{
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387))
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE)
return AS1 (jb,%l0);
if (cc_prev_status.flags & CC_TEST_AX)
{
@ -5419,7 +5419,7 @@
""
"*
{
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387))
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE)
return AS1 (jne,%l0);
if (cc_prev_status.flags & CC_TEST_AX)
{
@ -5449,7 +5449,7 @@
""
"*
{
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387))
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE)
return AS1 (jne,%l0);
if (cc_prev_status.flags & CC_TEST_AX)
{
@ -5480,7 +5480,7 @@
""
"*
{
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387))
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE)
return AS1 (jne,%l0);
if (cc_prev_status.flags & CC_TEST_AX)
{
@ -5510,7 +5510,7 @@
""
"*
{
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387))
if (TARGET_IEEE_FP && (cc_prev_status.flags & CC_IN_80387) && !TARGET_CMOVE)
return AS1 (jae,%l0);
if (cc_prev_status.flags & CC_TEST_AX)
@ -6743,8 +6743,8 @@
[(match_dup 4)
(set (match_operand 0 "register_operand" "")
(if_then_else:SI (match_operand 1 "comparison_operator" "")
(match_operand:SI 2 "nonimmediate_operand" "")
(match_operand:SI 3 "nonimmediate_operand" "")))]
(match_operand:SI 2 "general_operand" "")
(match_operand:SI 3 "general_operand" "")))]
"TARGET_CMOVE"
"
{
@ -6755,8 +6755,8 @@
[(match_dup 4)
(set (match_operand 0 "register_operand" "")
(if_then_else:HI (match_operand 1 "comparison_operator" "")
(match_operand:HI 2 "nonimmediate_operand" "")
(match_operand:HI 3 "nonimmediate_operand" "")))]
(match_operand:HI 2 "general_operand" "")
(match_operand:HI 3 "general_operand" "")))]
"TARGET_CMOVE"
"
{
@ -6764,11 +6764,11 @@
}")
(define_insn "movsicc_1"
[(set (match_operand:SI 0 "register_operand" "=r,r,&r,&r")
[(set (match_operand:SI 0 "register_operand" "=r,r,&r")
(if_then_else:SI (match_operator 1 "comparison_operator"
[(cc0) (const_int 0)])
(match_operand:SI 2 "nonimmediate_operand" "rm,0,rm,g")
(match_operand:SI 3 "nonimmediate_operand" "0,rm,rm,g")))]
(match_operand:SI 2 "nonimmediate_operand" "rm,0,rm")
(match_operand:SI 3 "nonimmediate_operand" "0,rm,rm")))]
"TARGET_CMOVE"
"*
{
@ -6791,24 +6791,33 @@
output_asm_insn (AS2 (cmov%C1,%2,%0), operands);
output_asm_insn (AS2 (cmov%c1,%3,%0), operands);
}
else
{
/* r <- cond ? arg1 : arg2 */
operands[4] = gen_label_rtx ();
output_asm_insn (AS2 (mov%L0,%2,%0), operands);
output_asm_insn (\"j%C1 %l4\", operands);
output_asm_insn (AS2 (mov%L0,%3,%0), operands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[4]));
}
RET;
}")
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "r")
(if_then_else:SI (match_operator 1 "comparison_operator"
[(cc0) (const_int 0)])
(match_operand:SI 2 "general_operand" "")
(match_operand:SI 3 "general_operand" "")))]
"TARGET_CMOVE"
"*
{
/* r <- cond ? arg1 : arg2 */
operands[4] = gen_label_rtx ();
output_asm_insn (AS2 (mov%L0,%2,%0), operands);
output_asm_insn (\"j%C1 %l4\", operands);
output_asm_insn (AS2 (mov%L0,%3,%0), operands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[4]));
RET;
}")
(define_insn "movhicc_1"
[(set (match_operand:HI 0 "register_operand" "=r,r,&r,&r")
[(set (match_operand:HI 0 "register_operand" "=r,r,&r")
(if_then_else:HI (match_operator 1 "comparison_operator"
[(cc0) (const_int 0)])
(match_operand:HI 2 "nonimmediate_operand" "rm,0,rm,g")
(match_operand:HI 3 "nonimmediate_operand" "0,rm,rm,g")))]
(match_operand:HI 2 "nonimmediate_operand" "rm,0,rm")
(match_operand:HI 3 "nonimmediate_operand" "0,rm,rm")))]
"TARGET_CMOVE"
"*
{
@ -6831,15 +6840,24 @@
output_asm_insn (AS2 (cmov%C1,%2,%0), operands);
output_asm_insn (AS2 (cmov%c1,%3,%0), operands);
}
else
{
RET;
}")
(define_insn ""
[(set (match_operand:HI 0 "register_operand" "r")
(if_then_else:HI (match_operator 1 "comparison_operator"
[(cc0) (const_int 0)])
(match_operand:HI 2 "general_operand" "")
(match_operand:HI 3 "general_operand" "")))]
"TARGET_CMOVE"
"*
{
/* r <- cond ? arg1 : arg2 */
operands[4] = gen_label_rtx ();
output_asm_insn (AS2 (mov%L0,%2,%0), operands);
output_asm_insn (\"j%C1 %l4\", operands);
output_asm_insn (AS2 (mov%L0,%3,%0), operands);
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[4]));
}
RET;
}")
@ -6913,12 +6931,12 @@
if (which_alternative == 0)
{
/* r <- cond ? arg : r */
output_asm_insn (AS2 (fcmov%F1,%3,%0), operands);
output_asm_insn (AS2 (fcmov%f1,%3,%0), operands);
}
else if (which_alternative == 1)
{
/* r <- cond ? r : arg */
output_asm_insn (AS2 (fcmov%f1,%2,%0), operands);
output_asm_insn (AS2 (fcmov%F1,%2,%0), operands);
}
RET;
}")
@ -6935,12 +6953,12 @@
if (which_alternative == 0)
{
/* r <- cond ? arg : r */
output_asm_insn (AS2 (fcmov%F1,%3,%0), operands);
output_asm_insn (AS2 (fcmov%f1,%3,%0), operands);
}
else if (which_alternative == 1)
{
/* r <- cond ? r : arg */
output_asm_insn (AS2 (fcmov%f1,%2,%0), operands);
output_asm_insn (AS2 (fcmov%F1,%2,%0), operands);
}
RET;
}")