aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStan Cox <coxs@gnu.org>1996-08-02 21:27:07 +0000
committerStan Cox <coxs@gnu.org>1996-08-02 21:27:07 +0000
commitf8a5c113dd2a02970b87121571de46f5f1f09007 (patch)
tree84588f4249b3b72924bee9987cb1784f074649dc /gcc
parentd773e0157583ea8026ad87d9f2c61508adb0ab37 (diff)
downloadgcc-f8a5c113dd2a02970b87121571de46f5f1f09007.zip
gcc-f8a5c113dd2a02970b87121571de46f5f1f09007.tar.gz
gcc-f8a5c113dd2a02970b87121571de46f5f1f09007.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/i386.md82
1 files changed, 50 insertions, 32 deletions
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 4cc9f24..e9cc5d5 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -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
- {
+ 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;
}")