]> gcc.gnu.org Git - gcc.git/commitdiff
Added TARGET_CMOVE check for fcomi.
authorStan Cox <coxs@gnu.org>
Fri, 2 Aug 1996 21:27:07 +0000 (21:27 +0000)
committerStan Cox <coxs@gnu.org>
Fri, 2 Aug 1996 21:27:07 +0000 (21:27 +0000)
(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

gcc/config/i386/i386.md

index 4cc9f2468ccaaa03bfd96acbae09a16f89b96c97..e9cc5d5cbddbf5238df29901279abb294a92f09a 100644 (file)
   ""
   "*
 {
-  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);
   ""
   "*
 {
-  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\");
   ""
   "*
 {
-  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\");
   ""
   "*
 {
-  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);
   ""
   "*
 {
-  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)
   ""
   "*
 {
-  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)
   ""
   "*
 {
-  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)
     {
   ""
   "*
 {
-  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)
     {
   ""
   "*
 {
-  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)
     {
   ""
   "*
 {
-  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)
     {
   ""
   "*
 {
-  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)
     {
   ""
   "*
 {
-  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)
   [(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"
   "
 {
   [(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"
   "
 {
 }")
 
 (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"
   "*
 {
       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"
   "*
 {
       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;
 }")
 
   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;
 }")
   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;
 }")
This page took 0.087174 seconds and 5 git commands to generate.