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: [PATCH, i386]: Fix is_sse condition


Richard Henderson wrote:

* config/i386/i386.c (output_fp_compare): Fix is_sse condition.
Use EFLAGS_P only when fcomi insn should be used. Fix handling
of eflags_p variable. Change alt table accordingly. For non-fcomi
compare insn always use trailing fnstsw insn. Fix intmode
calculation for ficom insn.


Ok.



Thanks. There are a couple of other places, where is_sse condition should be fixed. Obvious patch is attached to this message.

Bootstrapped i686-pc-linux-gnu, regtesting in progress.

2004-12-08 Uros Bizjak <uros@kss-loka.si>

   * config/i386/i386.c (output_387_binary_op,
   ix86_prepare_fp_compare_args): Fix is_sse condition.

Uros.

Index: i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.749
diff -u -p -r1.749 i386.c
--- i386.c	8 Dec 2004 06:50:55 -0000	1.749
+++ i386.c	8 Dec 2004 06:53:07 -0000
@@ -6901,7 +6901,7 @@ output_387_binary_op (rtx insn, rtx *ope
   static char buf[30];
   const char *p;
   const char *ssep;
-  int is_sse = SSE_REG_P (operands[0]) | SSE_REG_P (operands[1]) | SSE_REG_P (operands[2]);
+  int is_sse = SSE_REG_P (operands[0]) || SSE_REG_P (operands[1]) || SSE_REG_P (operands[2]);
 
 #ifdef ENABLE_CHECKING
   /* Even if we do not want to check the inputs, this documents input
@@ -7925,7 +7925,7 @@ ix86_prepare_fp_compare_args (enum rtx_c
   enum machine_mode fpcmp_mode = ix86_fp_compare_mode (code);
   rtx op0 = *pop0, op1 = *pop1;
   enum machine_mode op_mode = GET_MODE (op0);
-  int is_sse = SSE_REG_P (op0) | SSE_REG_P (op1);
+  int is_sse = SSE_REG_P (op0) || SSE_REG_P (op1);
 
   /* All of the unordered compare instructions only work on registers.
      The same is true of the fcomi compare instructions.  The same is

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