Commit d8ff1871 by Jan Hubicka Committed by Jan Hubicka

re PR target/20928 (ICE: unrecognizable insns with -fPIC -O1)


	PR target/20928
	* i386.c (legitimize_pic_address): Deal with large immediates.

	* gcc.c-torture/compile/pr20928.c: New test.

From-SVN: r106284
parent 2b557972
2005-10-31 Jan Hubicka <jh@suse.cz> 2005-10-31 Jan Hubicka <jh@suse.cz>
PR target/20928
* i386.c (legitimize_pic_address): Deal with large immediates.
PR profile/20815 PR profile/20815
* coverage.c (coverage_checksum_string): Fix code to stip random seeds * coverage.c (coverage_checksum_string): Fix code to stip random seeds
from symbol names while computing checkup. from symbol names while computing checkup.
......
...@@ -6016,7 +6016,18 @@ legitimize_pic_address (rtx orig, rtx reg) ...@@ -6016,7 +6016,18 @@ legitimize_pic_address (rtx orig, rtx reg)
} }
else else
{ {
if (GET_CODE (addr) == CONST) if (GET_CODE (addr) == CONST_INT
&& !x86_64_immediate_operand (addr, VOIDmode))
{
if (reg)
{
emit_move_insn (reg, addr);
new = reg;
}
else
new = force_reg (Pmode, addr);
}
else if (GET_CODE (addr) == CONST)
{ {
addr = XEXP (addr, 0); addr = XEXP (addr, 0);
......
2005-10-31 Jan Hubicka <jh@suse.cz>
PR target/20928
* gcc.c-torture/compile/pr20928.c: New test.
2005-10-31 Andrew Pinski <pinskia@physics.uc.edu> 2005-10-31 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/23492 PR middle-end/23492
extern struct bar_t bar;
void *a;
void
foo (void)
{
void **p = a;
do {
*p++ = ((unsigned char *) &bar + ((unsigned long int) 1L << 31));
} while (p);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment