aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl@gnu.org>1998-07-26 00:12:12 +0000
committerJeff Law <law@gcc.gnu.org>1998-07-25 18:12:12 -0600
commit60aeab7f32837b7512fddbe221b0cac475716a6f (patch)
tree9f9c52891b9ee1d5662b269b9f82fd696c53f85c
parentbc6bd744c5c1afa8f2afce8b56c3ae170ab3b30c (diff)
downloadgcc-60aeab7f32837b7512fddbe221b0cac475716a6f.zip
gcc-60aeab7f32837b7512fddbe221b0cac475716a6f.tar.gz
gcc-60aeab7f32837b7512fddbe221b0cac475716a6f.tar.bz2
i386.c (output_to_reg): Add code to emulate non-popping DImode case.
� * i386.c (output_to_reg): Add code to emulate non-popping DImode case. From-SVN: r21389
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c11
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b9afc60..fd39809 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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:01:32 1998 Jeffrey A Law (law@cygnus.com)
* regmove.c (regmove_optimize): Fix typo initializing regmove_bb_head.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 76f5370..8e5211f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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);
}