2005-05-12 Richard Earnshaw <richard.earnshaw@arm.com>
+ PR target/21501
+ * arm.c (arm_gen_constant): Sign-extend intermediate values when
+ synthesizing a constant of the difference of two immediates.
+
+2005-05-12 Richard Earnshaw <richard.earnshaw@arm.com>
+
* arm/vfp.md (negsf2_vfp): Add alternative using integer registers.
(negdf2_vfp): Likewise. Convert to define_insn_and_split and split
the alternatives using integer registers into the appropriate
{
int topshift = clear_sign_bit_copies & ~1;
- temp1 = ((remainder + (0x00800000 >> topshift))
- & (0xff000000 >> topshift));
+ temp1 = ARM_SIGN_EXTEND ((remainder + (0x00800000 >> topshift))
+ & (0xff000000 >> topshift));
/* If temp1 is zero, then that means the 9 most significant
bits of remainder were 1 and we've caused it to overflow.
if (temp1 == 0 && topshift != 0)
temp1 = 0x80000000 >> (topshift - 1);
- temp2 = temp1 - remainder;
+ temp2 = ARM_SIGN_EXTEND (temp1 - remainder);
if (const_ok_for_arm (temp2))
{