This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

An x86 code gen patch (new)


There was a typo in my previous patch. This one is ok.

H.J.
-
> To fix
> 
> http://www.cygnus.com/ml/egcs-bugs/1998-Jul/0077.html
> http://www.cygnus.com/ml/egcs/1998-Jul/0106.html
> 
> Wed Jul 15 07:44:26 1998  H.J. Lu  (hjl@gnu.org)
> 
> 	* i386.c (output_to_reg): Add code to emulate non-popping DImode
> 	case.
> 

Wed Jul 15 07:44:26 1998  H.J. Lu  (hjl@gnu.org)

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

--- /home/work/misc/gnu/import/egcs/gcc/config/i386/i386.c	Tue Jul 14 07:36:17 1998
+++ config/i386/i386.c	Wed Jul 15 11:09:20 1998
@@ -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);
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]