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]

PR c/11639


Hi,
the patch fixes unrecognizable instruction otherwise produced by hammer
branch.  The bug exists (even when it does not reproduce due to more
limited if conversion) on mainline.  OK for mainline?

Honza

Mon Aug 18 16:21:36 CEST 2003  Jan Hubicka  <jh@suse.cz>
	PR c/11639
	* i386.c (ix86_expand_carry_flag_compare): Validate operand.
Index: config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.490.2.47
diff -c -3 -p -r1.490.2.47 i386.c
*** config/i386/i386.c	14 Aug 2003 13:20:20 -0000	1.490.2.47
--- config/i386/i386.c	18 Aug 2003 14:20:37 -0000
*************** ix86_expand_carry_flag_compare (code, op
*** 9562,9567 ****
--- 9562,9575 ----
      default:
        return false;
      }
+ 
+   /* Swapping operands may cause constant to appear as first operand.  */
+   if (!nonimmediate_operand (op0, VOIDmode))
+     {
+       if (no_new_pseudos)
+ 	return false;
+       op0 = force_reg (mode, op0);
+     }
    ix86_compare_op0 = op0;
    ix86_compare_op1 = op1;
    *pop = ix86_expand_compare (code, NULL, NULL);


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