OSDN Git Service

* config/i386/i386.md (fix_trunc<mode>_i387_fisttp_with_temp): Use 'X'
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 26 Apr 2008 13:43:13 +0000 (13:43 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 26 Apr 2008 13:43:13 +0000 (13:43 +0000)
        constraint for operand 2 when operand 0 is memory operand.
        (fix_truncdi_i387_with_temp): : Use 'X' constraint for operand 4 when
        operand 0 is memory operand.
        (fix_trunc<mode>_i387_with_temp): Ditto.
        (*floatsi<mode>2_vector_mixed_with_temp): Use 'X' constraint for
        operand 2 when operand 1 is memory operand.
        (*float<SSEMODEI24:mode><MODEF:mode>2_mixed_with_temp): Ditto.
        (*floatsi<mode>2_vector_sse_with_temp): Ditto.
        (*float<SSEMODEI24:mode><MODEF:mode>2_sse_with_temp): Ditto.
        (*float<SSEMODEI24:mode><X87MODEF:mode>2_i387_with_temp): Ditto.
        (floatdi<X87MODEF:mode>2_i387_with_xmm): Use 'X' constraint for
        operands 2,3 and 4 when operand 1 is memory operand.
        (fistdi2_with_temp): Use 'X' constraint for operand 2 when operand 0
        is memory operand.
        (fistdi2_floor_with_temp): Ditto.
        (fist<mode>2_floor_with_temp): Ditto.
        (fistdi2_ceil_with_temp): Ditto.
        (fist<mode>2_ceil_with_temp): Ditto.
        (*truncdfsf_fast_mixed): Merge alternatives 0 and 1.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134697 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.md

index 2435b89..843a2e2 100644 (file)
@@ -1,3 +1,26 @@
+2008-04-26  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md (fix_trunc<mode>_i387_fisttp_with_temp): Use 'X'
+       constraint for operand 2 when operand 0 is memory operand.
+       (fix_truncdi_i387_with_temp): : Use 'X' constraint for operand 4 when
+       operand 0 is memory operand.
+       (fix_trunc<mode>_i387_with_temp): Ditto.
+       (*floatsi<mode>2_vector_mixed_with_temp): Use 'X' constraint for
+       operand 2 when operand 1 is memory operand.
+       (*float<SSEMODEI24:mode><MODEF:mode>2_mixed_with_temp): Ditto.
+       (*floatsi<mode>2_vector_sse_with_temp): Ditto.
+       (*float<SSEMODEI24:mode><MODEF:mode>2_sse_with_temp): Ditto.
+       (*float<SSEMODEI24:mode><X87MODEF:mode>2_i387_with_temp): Ditto.
+       (floatdi<X87MODEF:mode>2_i387_with_xmm): Use 'X' constraint for
+       operands 2,3 and 4 when operand 1 is memory operand.
+       (fistdi2_with_temp): Use 'X' constraint for operand 2 when operand 0
+       is memory operand.
+       (fistdi2_floor_with_temp): Ditto.
+       (fist<mode>2_floor_with_temp): Ditto.
+       (fistdi2_ceil_with_temp): Ditto.
+       (fist<mode>2_ceil_with_temp): Ditto.
+       (*truncdfsf_fast_mixed): Merge alternatives 0 and 1.
+
 2008-04-26  David Daney  <ddaney@avtrex.com>
 
        * config/mips/mips.md (UNSPEC_COMPARE_AND_SWAP_12): New
 2008-04-26  David Daney  <ddaney@avtrex.com>
 
        * config/mips/mips.md (UNSPEC_COMPARE_AND_SWAP_12): New
index 102f7f7..71f6031 100644 (file)
   "")
 
 (define_insn "*truncdfsf_fast_mixed"
   "")
 
 (define_insn "*truncdfsf_fast_mixed"
-  [(set (match_operand:SF 0 "nonimmediate_operand"   "=m,f,x")
+  [(set (match_operand:SF 0 "nonimmediate_operand"   "=fm,x")
         (float_truncate:SF
         (float_truncate:SF
-          (match_operand:DF 1 "nonimmediate_operand" "f ,f,xm")))]
+          (match_operand:DF 1 "nonimmediate_operand" "f  ,xm")))]
   "TARGET_SSE2 && TARGET_MIX_SSE_I387 && flag_unsafe_math_optimizations"
 {
   switch (which_alternative)
     {
     case 0:
   "TARGET_SSE2 && TARGET_MIX_SSE_I387 && flag_unsafe_math_optimizations"
 {
   switch (which_alternative)
     {
     case 0:
-    case 1:
       return output_387_reg_move (insn, operands);
       return output_387_reg_move (insn, operands);
-    case 2:
+    case 1:
       return "cvtsd2ss\t{%1, %0|%0, %1}";
     default:
       gcc_unreachable ();
     }
 }
       return "cvtsd2ss\t{%1, %0|%0, %1}";
     default:
       gcc_unreachable ();
     }
 }
-  [(set_attr "type" "fmov,fmov,ssecvt")
+  [(set_attr "type" "fmov,ssecvt")
    (set_attr "mode" "SF")])
 
 ;; Yes, this one doesn't depend on flag_unsafe_math_optimizations,
    (set_attr "mode" "SF")])
 
 ;; Yes, this one doesn't depend on flag_unsafe_math_optimizations,
 (define_insn "fix_trunc<mode>_i387_fisttp_with_temp"
   [(set (match_operand:X87MODEI 0 "nonimmediate_operand" "=m,?r")
        (fix:X87MODEI (match_operand 1 "register_operand" "f,f")))
 (define_insn "fix_trunc<mode>_i387_fisttp_with_temp"
   [(set (match_operand:X87MODEI 0 "nonimmediate_operand" "=m,?r")
        (fix:X87MODEI (match_operand 1 "register_operand" "f,f")))
-   (clobber (match_operand:X87MODEI 2 "memory_operand" "=m,m"))
+   (clobber (match_operand:X87MODEI 2 "memory_operand" "=X,m"))
    (clobber (match_scratch:XF 3 "=&1f,&1f"))]
   "X87_FLOAT_MODE_P (GET_MODE (operands[1]))
    && TARGET_FISTTP
    (clobber (match_scratch:XF 3 "=&1f,&1f"))]
   "X87_FLOAT_MODE_P (GET_MODE (operands[1]))
    && TARGET_FISTTP
        (fix:DI (match_operand 1 "register_operand" "f,f")))
    (use (match_operand:HI 2 "memory_operand" "m,m"))
    (use (match_operand:HI 3 "memory_operand" "m,m"))
        (fix:DI (match_operand 1 "register_operand" "f,f")))
    (use (match_operand:HI 2 "memory_operand" "m,m"))
    (use (match_operand:HI 3 "memory_operand" "m,m"))
-   (clobber (match_operand:DI 4 "memory_operand" "=m,m"))
+   (clobber (match_operand:DI 4 "memory_operand" "=X,m"))
    (clobber (match_scratch:XF 5 "=&1f,&1f"))]
   "X87_FLOAT_MODE_P (GET_MODE (operands[1]))
    && !TARGET_FISTTP
    (clobber (match_scratch:XF 5 "=&1f,&1f"))]
   "X87_FLOAT_MODE_P (GET_MODE (operands[1]))
    && !TARGET_FISTTP
        (fix:X87MODEI12 (match_operand 1 "register_operand" "f,f")))
    (use (match_operand:HI 2 "memory_operand" "m,m"))
    (use (match_operand:HI 3 "memory_operand" "m,m"))
        (fix:X87MODEI12 (match_operand 1 "register_operand" "f,f")))
    (use (match_operand:HI 2 "memory_operand" "m,m"))
    (use (match_operand:HI 3 "memory_operand" "m,m"))
-   (clobber (match_operand:X87MODEI12 4 "memory_operand" "=m,m"))]
+   (clobber (match_operand:X87MODEI12 4 "memory_operand" "=X,m"))]
   "X87_FLOAT_MODE_P (GET_MODE (operands[1]))
    && !TARGET_FISTTP
    && !SSE_FLOAT_MODE_P (GET_MODE (operands[1]))"
   "X87_FLOAT_MODE_P (GET_MODE (operands[1]))
    && !TARGET_FISTTP
    && !SSE_FLOAT_MODE_P (GET_MODE (operands[1]))"
   [(set (match_operand:MODEF 0 "register_operand" "=f,f,x,x,x")
        (float:MODEF
          (match_operand:SI 1 "nonimmediate_operand" "m,?r,r,m,!x")))
   [(set (match_operand:MODEF 0 "register_operand" "=f,f,x,x,x")
        (float:MODEF
          (match_operand:SI 1 "nonimmediate_operand" "m,?r,r,m,!x")))
-   (clobber (match_operand:SI 2 "memory_operand" "=m,m,m,m,m"))]
+   (clobber (match_operand:SI 2 "memory_operand" "=X,m,m,X,m"))]
   "TARGET_SSE2 && TARGET_MIX_SSE_I387
    && TARGET_USE_VECTOR_CONVERTS && !optimize_size"
   "#"
   "TARGET_SSE2 && TARGET_MIX_SSE_I387
    && TARGET_USE_VECTOR_CONVERTS && !optimize_size"
   "#"
   [(set (match_operand:MODEF 0 "register_operand" "=f,f,x,x")
        (float:MODEF
          (match_operand:SSEMODEI24 1 "nonimmediate_operand" "m,?r,r,m")))
   [(set (match_operand:MODEF 0 "register_operand" "=f,f,x,x")
        (float:MODEF
          (match_operand:SSEMODEI24 1 "nonimmediate_operand" "m,?r,r,m")))
-  (clobber (match_operand:SSEMODEI24 2 "memory_operand" "=m,m,m,m"))]
+  (clobber (match_operand:SSEMODEI24 2 "memory_operand" "=X,m,m,X"))]
   "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT)
    && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_MIX_SSE_I387"
   "#"
   "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT)
    && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_MIX_SSE_I387"
   "#"
   [(set (match_operand:MODEF 0 "register_operand" "=x,x,x")
        (float:MODEF
          (match_operand:SI 1 "nonimmediate_operand" "r,m,!x")))
   [(set (match_operand:MODEF 0 "register_operand" "=x,x,x")
        (float:MODEF
          (match_operand:SI 1 "nonimmediate_operand" "r,m,!x")))
-   (clobber (match_operand:SI 2 "memory_operand" "=m,m,m"))]
+   (clobber (match_operand:SI 2 "memory_operand" "=m,X,m"))]
   "TARGET_SSE2 && TARGET_SSE_MATH
    && TARGET_USE_VECTOR_CONVERTS && !optimize_size"
   "#"
   "TARGET_SSE2 && TARGET_SSE_MATH
    && TARGET_USE_VECTOR_CONVERTS && !optimize_size"
   "#"
   [(set (match_operand:MODEF 0 "register_operand" "=x,x")
        (float:MODEF
          (match_operand:SSEMODEI24 1 "nonimmediate_operand" "r,m")))
   [(set (match_operand:MODEF 0 "register_operand" "=x,x")
        (float:MODEF
          (match_operand:SSEMODEI24 1 "nonimmediate_operand" "r,m")))
-  (clobber (match_operand:SSEMODEI24 2 "memory_operand" "=m,m"))]
+  (clobber (match_operand:SSEMODEI24 2 "memory_operand" "=m,X"))]
   "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT)
    && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH"
   "#"
   "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT)
    && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH"
   "#"
   [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
        (float:X87MODEF
          (match_operand:SSEMODEI24 1 "nonimmediate_operand" "m,?r")))
   [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
        (float:X87MODEF
          (match_operand:SSEMODEI24 1 "nonimmediate_operand" "m,?r")))
-  (clobber (match_operand:SSEMODEI24 2 "memory_operand" "=m,m"))]
+  (clobber (match_operand:SSEMODEI24 2 "memory_operand" "=X,m"))]
   "TARGET_80387"
   "@
    fild%z1\t%1
   "TARGET_80387"
   "@
    fild%z1\t%1
   [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
        (float:X87MODEF
          (match_operand:DI 1 "nonimmediate_operand" "m,?r")))
   [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
        (float:X87MODEF
          (match_operand:DI 1 "nonimmediate_operand" "m,?r")))
-   (clobber (match_scratch:V4SI 3 "=&x,x"))
-   (clobber (match_scratch:V4SI 4 "=&x,x"))
-   (clobber (match_operand:DI 2 "memory_operand" "=m,m"))]
+   (clobber (match_scratch:V4SI 3 "=X,x"))
+   (clobber (match_scratch:V4SI 4 "=X,x"))
+   (clobber (match_operand:DI 2 "memory_operand" "=X,m"))]
   "TARGET_80387 && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES
    && !TARGET_64BIT && !optimize_size"
   "#"
   "TARGET_80387 && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES
    && !TARGET_64BIT && !optimize_size"
   "#"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=m,?r")
        (unspec:DI [(match_operand:XF 1 "register_operand" "f,f")]
                   UNSPEC_FIST))
   [(set (match_operand:DI 0 "nonimmediate_operand" "=m,?r")
        (unspec:DI [(match_operand:XF 1 "register_operand" "f,f")]
                   UNSPEC_FIST))
-   (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
+   (clobber (match_operand:DI 2 "memory_operand" "=X,m"))
    (clobber (match_scratch:XF 3 "=&1f,&1f"))]
   "TARGET_USE_FANCY_MATH_387"
   "#"
    (clobber (match_scratch:XF 3 "=&1f,&1f"))]
   "TARGET_USE_FANCY_MATH_387"
   "#"
         UNSPEC_FIST_FLOOR))
    (use (match_operand:HI 2 "memory_operand" "m,m"))
    (use (match_operand:HI 3 "memory_operand" "m,m"))
         UNSPEC_FIST_FLOOR))
    (use (match_operand:HI 2 "memory_operand" "m,m"))
    (use (match_operand:HI 3 "memory_operand" "m,m"))
-   (clobber (match_operand:DI 4 "memory_operand" "=m,m"))
+   (clobber (match_operand:DI 4 "memory_operand" "=X,m"))
    (clobber (match_scratch:XF 5 "=&1f,&1f"))]
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
    (clobber (match_scratch:XF 5 "=&1f,&1f"))]
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
         UNSPEC_FIST_FLOOR))
    (use (match_operand:HI 2 "memory_operand" "m,m"))
    (use (match_operand:HI 3 "memory_operand" "m,m"))
         UNSPEC_FIST_FLOOR))
    (use (match_operand:HI 2 "memory_operand" "m,m"))
    (use (match_operand:HI 3 "memory_operand" "m,m"))
-   (clobber (match_operand:X87MODEI12 4 "memory_operand" "=m,m"))]
+   (clobber (match_operand:X87MODEI12 4 "memory_operand" "=X,m"))]
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
   "#"
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
   "#"
         UNSPEC_FIST_CEIL))
    (use (match_operand:HI 2 "memory_operand" "m,m"))
    (use (match_operand:HI 3 "memory_operand" "m,m"))
         UNSPEC_FIST_CEIL))
    (use (match_operand:HI 2 "memory_operand" "m,m"))
    (use (match_operand:HI 3 "memory_operand" "m,m"))
-   (clobber (match_operand:DI 4 "memory_operand" "=m,m"))
+   (clobber (match_operand:DI 4 "memory_operand" "=X,m"))
    (clobber (match_scratch:XF 5 "=&1f,&1f"))]
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
    (clobber (match_scratch:XF 5 "=&1f,&1f"))]
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
         UNSPEC_FIST_CEIL))
    (use (match_operand:HI 2 "memory_operand" "m,m"))
    (use (match_operand:HI 3 "memory_operand" "m,m"))
         UNSPEC_FIST_CEIL))
    (use (match_operand:HI 2 "memory_operand" "m,m"))
    (use (match_operand:HI 3 "memory_operand" "m,m"))
-   (clobber (match_operand:X87MODEI12 4 "memory_operand" "=m,m"))]
+   (clobber (match_operand:X87MODEI12 4 "memory_operand" "=X,m"))]
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
   "#"
   "TARGET_USE_FANCY_MATH_387
    && flag_unsafe_math_optimizations"
   "#"