i386.md (*truncdfsf2_i387_1): New pattern.
authorRoger Sayle <roger@eyesopen.com>
Tue, 5 Apr 2005 01:38:56 +0000 (01:38 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Tue, 5 Apr 2005 01:38:56 +0000 (01:38 +0000)
* config/i386/i386.md (*truncdfsf2_i387_1): New pattern.

* fold-const.c (maybe_lvalue_p): Delete orphaned comment.

From-SVN: r97594

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/fold-const.c

index b3e4dcd156a2293d7b13ebb48371c4b9f381569b..cd88e03c26b80ce290df223b4599c56395ec4ebd 100644 (file)
@@ -1,3 +1,9 @@
+2005-04-04  Roger Sayle  <roger@eyesopen.com>
+
+       * config/i386/i386.md (*truncdfsf2_i387_1): New pattern.
+
+       * fold-const.c (maybe_lvalue_p): Delete orphaned comment.
+
 2005-04-04  Ian Lance Taylor  <ian@airs.com>
 
        * c-typeck.c (struct c_switch): Rename switch_stmt field to
index 5fc7fab2dd19331b6df8328d283b22331690b10e..f9df272e217632c544c9732b269896ebeba0ba5b 100644 (file)
   [(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
index efbf8ed5c78bb6b4b031ce9ae13a484855879f9b..c59a981351cf710753e2f8c2fc2ed49253f86970 100644 (file)
@@ -2005,7 +2005,6 @@ fold_convert (tree type, tree arg)
 \f
 /* 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)