From 500d8ed25c3d12340898e5f236b7b6b40f147406 Mon Sep 17 00:00:00 2001 From: uros Date: Sat, 26 Apr 2008 13:43:13 +0000 Subject: [PATCH] * config/i386/i386.md (fix_trunc_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_i387_with_temp): Ditto. (*floatsi2_vector_mixed_with_temp): Use 'X' constraint for operand 2 when operand 1 is memory operand. (*float2_mixed_with_temp): Ditto. (*floatsi2_vector_sse_with_temp): Ditto. (*float2_sse_with_temp): Ditto. (*float2_i387_with_temp): Ditto. (floatdi2_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. (fist2_floor_with_temp): Ditto. (fistdi2_ceil_with_temp): Ditto. (fist2_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 | 23 +++++++++++++++++++++++ gcc/config/i386/i386.md | 41 ++++++++++++++++++++--------------------- 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2435b89..843a2e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,26 @@ +2008-04-26 Uros Bizjak + + * config/i386/i386.md (fix_trunc_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_i387_with_temp): Ditto. + (*floatsi2_vector_mixed_with_temp): Use 'X' constraint for + operand 2 when operand 1 is memory operand. + (*float2_mixed_with_temp): Ditto. + (*floatsi2_vector_sse_with_temp): Ditto. + (*float2_sse_with_temp): Ditto. + (*float2_i387_with_temp): Ditto. + (floatdi2_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. + (fist2_floor_with_temp): Ditto. + (fistdi2_ceil_with_temp): Ditto. + (fist2_ceil_with_temp): Ditto. + (*truncdfsf_fast_mixed): Merge alternatives 0 and 1. + 2008-04-26 David Daney * config/mips/mips.md (UNSPEC_COMPARE_AND_SWAP_12): New diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 102f7f7..71f6031 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -4206,23 +4206,22 @@ "") (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 - (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: - case 1: return output_387_reg_move (insn, operands); - case 2: + case 1: 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, @@ -4640,7 +4639,7 @@ (define_insn "fix_trunc_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 @@ -4729,7 +4728,7 @@ (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 @@ -4786,7 +4785,7 @@ (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]))" @@ -4963,7 +4962,7 @@ [(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" "#" @@ -4993,7 +4992,7 @@ [(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"))] "(mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (mode) && TARGET_MIX_SSE_I387" "#" @@ -5071,7 +5070,7 @@ [(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" "#" @@ -5215,7 +5214,7 @@ [(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"))] "(mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH" "#" @@ -5301,7 +5300,7 @@ [(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 @@ -5349,9 +5348,9 @@ [(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" "#" @@ -17530,7 +17529,7 @@ [(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" "#" @@ -17780,7 +17779,7 @@ 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" @@ -17839,7 +17838,7 @@ 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" "#" @@ -18045,7 +18044,7 @@ 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" @@ -18104,7 +18103,7 @@ 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" "#" -- 2.7.4