]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.c (output_to_reg): Add code to emulate non-popping DImode case.
authorH.J. Lu <hjl@gnu.org>
Sun, 26 Jul 1998 00:13:01 +0000 (00:13 +0000)
committerJeff Law <law@gcc.gnu.org>
Sun, 26 Jul 1998 00:13:01 +0000 (18:13 -0600)

        * i386.c (output_to_reg): Add code to emulate non-popping DImode
        case.

From-SVN: r21390

gcc/ChangeLog
gcc/config/i386/i386.c

index ed3ade8a40ec4242a974701a37925e08023a2600..85d36f68cafc338a8ecb38f33ce37776b2289829 100644 (file)
@@ -1,3 +1,8 @@
+Sun Jul 26 01:11:12 1998  H.J. Lu  (hjl@gnu.org)
+
+       * i386.c (output_to_reg): Add code to emulate non-popping DImode
+       case.
+
 Sun Jul 26 01:02:54 1998  Jeffrey A Law  (law@cygnus.com)
 
        * regmove.c (regmove_optimize): Fix typo initializing regmove_bb_head.
index 76f5370f410edcf430622dedcad7f0325e825d7b..8e5211f133793cddd4776b6517c1936764a66939 100644 (file)
@@ -891,6 +891,17 @@ output_to_reg (dest, dies, scratch_mem)
     {
       if (dies)
        output_asm_insn (AS1 (fistp%z3,%y0), xops);
+      else if (GET_MODE (xops[3]) == DImode && ! dies)
+       {
+         /* There is no DImode version of this without a stack pop, so
+            we must emulate it.  It doesn't matter much what the second
+            instruction is, because the value being pushed on the FP stack
+            is not used except for the following stack popping store.
+            This case can only happen without optimization, so it doesn't
+            matter that it is inefficient.  */
+         output_asm_insn (AS1 (fistp%z3,%0), xops);
+         output_asm_insn (AS1 (fild%z3,%0), xops);
+       }
       else
        output_asm_insn (AS1 (fist%z3,%y0), xops);
     }