(movsfcc_1, movdfcc_1, movxfcc_1): Use singlemove_string
authorStan Cox <coxs@gnu.org>
Thu, 29 May 1997 19:41:36 +0000 (19:41 +0000)
committerStan Cox <coxs@gnu.org>
Thu, 29 May 1997 19:41:36 +0000 (19:41 +0000)
From-SVN: r14138

gcc/config/i386/i386.md

index b5ef6a778266dc0655a49b355550bfa4a5619527..e3deee53c4120205a9ac8c76654c7e0be0f615cb 100644 (file)
@@ -7365,8 +7365,8 @@ byte_xor_operation:
   [(match_dup 4)
    (set (match_operand 0 "register_operand" "t")
        (if_then_else:DF (match_operand 1 "comparison_operator" "")
-                        (match_operand:DF 2 "register_operand" "f")
-                        (match_operand:DF 3 "register_operand" "f")))]
+                        (match_operand:DF 2 "general_operand" "")
+                        (match_operand:DF 3 "general_operand" "")))]
   "TARGET_CMOVE"
   "
 {
@@ -7377,8 +7377,8 @@ byte_xor_operation:
   [(match_dup 4)
    (set (match_operand 0 "register_operand" "t")
        (if_then_else:XF (match_operand 1 "comparison_operator" "")
-                        (match_operand:XF 2 "register_operand" "f")
-                        (match_operand:XF 3 "register_operand" "f")))]
+                        (match_operand:XF 2 "general_operand" "")
+                        (match_operand:XF 3 "general_operand" "")))]
   "TARGET_CMOVE"
   "
 {
@@ -7423,16 +7423,16 @@ byte_xor_operation:
         {
           xops[0] = operands[0];
           xops[1] = operands[2];
-         output_move_const_single (xops);
+         output_asm_insn (singlemove_string (xops), 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[0] = operands[0];
          xops[1] = operands[3];
-         SET_SRC (PATTERN (insn)) = XEXP (SET_SRC (PATTERN (insn)), 2);
-         output_move_const_single (xops);
+         output_asm_insn (singlemove_string (xops), xops);
        }
       ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[4]));
 }
@@ -7477,16 +7477,16 @@ byte_xor_operation:
         {
           xops[0] = operands[0];
           xops[1] = operands[2];
-         output_move_const_single (xops);
+         output_asm_insn (singlemove_string (xops), 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[0] = operands[0];
          xops[1] = operands[3];
-         SET_SRC (PATTERN (insn)) = XEXP (SET_SRC (PATTERN (insn)), 2);
-         output_move_const_single (xops);
+         output_asm_insn (singlemove_string (xops), xops);
        }
       ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[4]));
 }
@@ -7494,11 +7494,11 @@ byte_xor_operation:
 }")
 
 (define_insn "movxfcc_1"
-  [(set (match_operand:XF 0 "register_operand" "=t,t")
+  [(set (match_operand:XF 0 "register_operand" "=t,=t,f,fFm")
        (if_then_else:XF (match_operator 1 "comparison_operator" 
                                [(cc0) (const_int 0)])
-                     (match_operand:XF 2 "register_operand" "0,f")
-                     (match_operand:XF 3 "register_operand" "f,0")))]
+                     (match_operand:XF 2 "register_operand" "0,f,f,fFm")
+                     (match_operand:XF 3 "register_operand" "f,0,f,fFm")))]
   "TARGET_CMOVE"
   "*
 {
@@ -7512,6 +7512,38 @@ byte_xor_operation:
       /* r <- cond ? r : arg */
       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_asm_insn (singlemove_string (xops), 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[0] = operands[0];
+         xops[1] = operands[3];
+         output_asm_insn (singlemove_string (xops), xops);
+       }
+      ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[4]));
+}
   RET;
 }")