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]
Other format: [Raw text]

Re: Ping^n: Fix PR target/22585


Uros Bizjak <uros.bizjak@kss-loka.si> writes:

> Follolwing patch fixes 4.0x regression, but is still unreviewed after 2 months:
> 
> http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01490.html

Approved and committed with a comment change.

Thanks.

:REVIEWURL http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01490.html:

Ian

Index: i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.859
diff -p -u -r1.859 i386.c
--- i386.c	14 Sep 2005 23:53:32 -0000	1.859
+++ i386.c	21 Sep 2005 18:37:06 -0000
@@ -9065,15 +9065,17 @@ ix86_prepare_fp_compare_args (enum rtx_c
   int is_sse = TARGET_SSE_MATH && SSE_FLOAT_MODE_P (op_mode);
 
   /* All of the unordered compare instructions only work on registers.
-     The same is true of the fcomi compare instructions.  The same is
-     true of the XFmode compare instructions if not comparing with
-     zero (ftst insn is used in this case).  */
+     The same is true of the fcomi compare instructions.  The XFmode
+     compare instructions require registers except when comparing
+     against zero or when converting operand 1 from fixed point to
+     floating point.  */
 
   if (!is_sse
       && (fpcmp_mode == CCFPUmode
 	  || (op_mode == XFmode
 	      && ! (standard_80387_constant_p (op0) == 1
-		    || standard_80387_constant_p (op1) == 1))
+		    || standard_80387_constant_p (op1) == 1)
+	      && GET_CODE (op1) != FLOAT)
 	  || ix86_use_fcomi_compare (code)))
     {
       op0 = force_reg (op_mode, op0);


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