* i386.md (fixsfsi2, fixdfdi2): Fix previous patch.
authorJan Hubicka <jh@suse.cz>
Tue, 13 Feb 2001 20:01:27 +0000 (21:01 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 13 Feb 2001 20:01:27 +0000 (20:01 +0000)
From-SVN: r39642

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

index 1f99f980ed1321d2c80bbcb0c7d08df06854ae78..7876cc4b79db1c040765f61f0268f4666d66f192 100644 (file)
@@ -1,3 +1,7 @@
+Tue Feb 13 20:59:22 CET 2001  Jan Hubicka  <jh@suse.cz>
+
+       * i386.md (fixsfsi2, fixdfdi2): Fix previous patch.
+
 Tue Feb 13 16:32:20 CET 2001  Jan Hubicka  <jh@suse.cz>
 
        * i386.md (fixsfsi2, fixdfdi2): Force operand to register
index 84c91e5a1604bcdbeec0ba1ebbd30ebaf382a497..d9e79baeeca687eeaba96fb541930985f25153b9 100644 (file)
 {
   if (TARGET_SSE2)
    {
-     operands[0] = force_reg (SImode, operands[0]);
-     emit_insn (gen_fix_truncdfsi_sse (operands[0], operands[1]));
+     rtx out = force_reg (SImode, operands[0]);
+     emit_insn (gen_fix_truncdfsi_sse (out, operands[1]));
+     if (out != operands[0])
+       emit_move_insn (operands[0], out);
      DONE;
    }
   else
 {
   if (TARGET_SSE2)
    {
-     operands[0] = force_reg (SImode, operands[0]);
-     emit_insn (gen_fix_truncsfsi_sse (operands[0], operands[1]));
+     rtx out = force_reg (SImode, operands[0]);
+     emit_insn (gen_fix_truncdfsi_sse (out, operands[1]));
+     if (out != operands[0])
+       emit_move_insn (operands[0], out);
      DONE;
    }
   else