+2002-05-30 Richard Henderson <rth@redhat.com>
+ Eric Botcazou <ebotcazou@multimania.com>
+
+ PR optimization/6822
+ * config/i386/i386.c (ix86_expand_int_movcc): Don't cast INTVAL
+ to unsigned int for op1 comparisons. Use gen_int_mode.
+
2002-05-30 Marc Espie <espie@openbsd.org>
+
* config.gcc (sparc64-*-openbsd*): New.
* config/sparc/openbsd1-64.h: New.
* config/sparc/openbsd64.h: New.
if ((code == LEU || code == GTU)
&& GET_CODE (ix86_compare_op1) == CONST_INT
&& mode != HImode
- && (unsigned int) INTVAL (ix86_compare_op1) != 0xffffffff
- /* The operand still must be representable as sign extended value. */
+ && INTVAL (ix86_compare_op1) != -1
+ /* For x86-64, the immediate field in the instruction is 32-bit
+ signed, so we can't increment a DImode value above 0x7fffffff. */
&& (!TARGET_64BIT
|| GET_MODE (ix86_compare_op0) != DImode
- || (unsigned int) INTVAL (ix86_compare_op1) != 0x7fffffff)
+ || INTVAL (ix86_compare_op1) != 0x7fffffff)
&& GET_CODE (operands[2]) == CONST_INT
&& GET_CODE (operands[3]) == CONST_INT)
{
code = LTU;
else
code = GEU;
- ix86_compare_op1 = GEN_INT (INTVAL (ix86_compare_op1) + 1);
+ ix86_compare_op1 = gen_int_mode (INTVAL (ix86_compare_op1) + 1,
+ GET_MODE (ix86_compare_op0));
}
start_sequence ();