+2006-09-24 Kazu Hirata <kazu@codesourcery.com>
+
+ PR target/28911
+ * config/m68k/m68k.md (negsf2, negdf2, negxf2): Use
+ -2147483647 - 1 instead of 0x80000000.
+
2006-09-23 Revital1 Eres <ERES@il.ibm.com>
* flags.h (HONOR_NANS): Fix typo in comment.
target = operand_subword_force (operands[0], 0, SFmode);
result = expand_binop (SImode, xor_optab,
operand_subword_force (operands[1], 0, SFmode),
- GEN_INT (0x80000000), target, 0, OPTAB_WIDEN);
+ GEN_INT (-2147483647 - 1), target, 0, OPTAB_WIDEN);
gcc_assert (result);
if (result != target)
target = operand_subword (operands[0], 0, 1, DFmode);
result = expand_binop (SImode, xor_optab,
operand_subword_force (operands[1], 0, DFmode),
- GEN_INT (0x80000000), target, 0, OPTAB_WIDEN);
+ GEN_INT (-2147483647 - 1), target, 0, OPTAB_WIDEN);
gcc_assert (result);
if (result != target)
target = operand_subword (operands[0], 0, 1, XFmode);
result = expand_binop (SImode, xor_optab,
operand_subword_force (operands[1], 0, XFmode),
- GEN_INT (0x80000000), target, 0, OPTAB_WIDEN);
+ GEN_INT (-2147483647 - 1), target, 0, OPTAB_WIDEN);
gcc_assert (result);
if (result != target)
--- /dev/null
+/* PR target/28911
+ The following used to cause crash on m68k-elf because 0x80000000
+ was used as an SImode constant. */
+
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-options "-O2 -m68000" { target m68k-*-* } } */
+
+_Complex float
+foo (float a)
+{
+ return __builtin_copysign (a != a, a);
+}