diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b3e4dcd156a2..cd88e03c26b8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-04-04 Roger Sayle + + * config/i386/i386.md (*truncdfsf2_i387_1): New pattern. + + * fold-const.c (maybe_lvalue_p): Delete orphaned comment. + 2005-04-04 Ian Lance Taylor * c-typeck.c (struct c_switch): Rename switch_stmt field to diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 5fc7fab2dd19..f9df272e2176 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -3787,6 +3787,22 @@ [(set_attr "type" "fmov,multi") (set_attr "mode" "SF")]) +(define_insn "*truncdfsf2_i387_1" + [(set (match_operand:SF 0 "memory_operand" "=m") + (float_truncate:SF + (match_operand:DF 1 "register_operand" "f")))] + "TARGET_80387 + && !(TARGET_SSE2 && TARGET_SSE_MATH) + && !TARGET_MIX_SSE_I387" +{ + if (find_regno_note (insn, REG_DEAD, REGNO (operands[1]))) + return "fstp%z0\t%y0"; + else + return "fst%z0\t%y0"; +} + [(set_attr "type" "fmov") + (set_attr "mode" "SF")]) + (define_split [(set (match_operand:SF 0 "register_operand" "") (float_truncate:SF diff --git a/gcc/fold-const.c b/gcc/fold-const.c index efbf8ed5c78b..c59a981351cf 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -2005,7 +2005,6 @@ fold_convert (tree type, tree arg) /* Return false if expr can be assumed not to be an value, true otherwise. */ -/* Return an expr equal to X but certainly not valid as an lvalue. */ static bool maybe_lvalue_p (tree x)