From f97d9ec3779fba07c222b4241da011afb1664a24 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 19 Nov 1999 21:27:08 +0100 Subject: [PATCH] i386.md (extend?f?f): Split to expander and pattern, refuse two memory operands in patterns. * i386.md (extend?f?f): Split to expander and pattern, refuse two memory operands in patterns. (fop*): Refuse two memory operands. From-SVN: r30593 --- gcc/ChangeLog | 4 +++ gcc/config/i386/i386.md | 54 ++++++++++++++++++++++++++++++++++------- 2 files changed, 49 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 53d964e1bf8..663be335a84 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ Fri Nov 19 06:32:19 CET 1999 Jan Hubicka + * i386.md (extend?f?f): Split to expander and pattern, refuse two + memory operands in patterns. + (fop*): Refuse two memory operands. + * i386.md (ashrsi3_31): Allow cltd when optimizing for size even on !TARGET_USE_CLTD CPUs. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index b5f3ee5cfae..8567cd54ed2 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2419,10 +2419,21 @@ [(set (reg:SI 7) (plus:SI (reg:SI 7) (const_int -12))) (set (mem:DF (reg:SI 7)) (float_extend:XF (match_dup 1)))]) -(define_insn "extendsfdf2" +(define_expand "extendsfdf2" + [(set (match_operand:DF 0 "nonimmediate_operand" "") + (float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "")))] + "TARGET_80387" + " +{ + if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) + operands[0] = force_reg (DFmode, operands[0]); +}") + +(define_insn "*extendsfdf2_1" [(set (match_operand:DF 0 "nonimmediate_operand" "=f,m") (float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "fm,f")))] - "TARGET_80387" + "TARGET_80387 + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "* { switch (which_alternative) @@ -2449,10 +2460,21 @@ }" [(set_attr "type" "fmov")]) -(define_insn "extendsfxf2" +(define_expand "extendsfxf2" + [(set (match_operand:XF 0 "nonimmediate_operand" "") + (float_extend:XF (match_operand:SF 1 "nonimmediate_operand" "")))] + "TARGET_80387" + " +{ + if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) + operands[0] = force_reg (XFmode, operands[0]); +}") + +(define_insn "*extendsfxf2_1" [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m") (float_extend:XF (match_operand:SF 1 "nonimmediate_operand" "fm,f")))] - "TARGET_80387" + "TARGET_80387 + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "* { switch (which_alternative) @@ -2480,10 +2502,21 @@ }" [(set_attr "type" "fmov")]) -(define_insn "extenddfxf2" +(define_expand "extenddfxf2" + [(set (match_operand:XF 0 "nonimmediate_operand" "") + (float_extend:XF (match_operand:DF 1 "nonimmediate_operand" "")))] + "TARGET_80387" + " +{ + if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) + operands[0] = force_reg (XFmode, operands[0]); +}") + +(define_insn "*extenddfxf2_1" [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m") (float_extend:XF (match_operand:DF 1 "nonimmediate_operand" "fm,f")))] - "TARGET_80387" + "TARGET_80387 + && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)" "* { switch (which_alternative) @@ -6826,7 +6859,8 @@ (match_operator:SF 3 "binary_fp_operator" [(match_operand:SF 1 "nonimmediate_operand" "0,fm") (match_operand:SF 2 "nonimmediate_operand" "fm,0")]))] - "TARGET_80387" + "TARGET_80387 + && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "* return output_387_binary_op (insn, operands);" [(set (attr "type") (cond [(match_operand:SF 3 "mult_operator" "") @@ -6875,7 +6909,8 @@ (match_operator:DF 3 "binary_fp_operator" [(match_operand:DF 1 "nonimmediate_operand" "0,fm") (match_operand:DF 2 "nonimmediate_operand" "fm,0")]))] - "TARGET_80387" + "TARGET_80387 + && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "* return output_387_binary_op (insn, operands);" [(set (attr "type") (cond [(match_operand:DF 3 "mult_operator" "") @@ -6924,7 +6959,8 @@ (match_operator:DF 3 "binary_fp_operator" [(float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "fm,0")) (match_operand:DF 2 "register_operand" "0,f")]))] - "TARGET_80387" + "TARGET_80387 + && (GET_CODE (operands[1]) != MEM || GET_CODE (operands[2]) != MEM)" "* return output_387_binary_op (insn, operands);" [(set (attr "type") (cond [(match_operand:DF 3 "mult_operator" "")