target/9929: [3.3/3.4 regression] Can't find spill register
Steven Bosscher
s.bosscher@student.tudelft.nl
Tue Mar 25 01:13:00 GMT 2003
Op di 25-03-2003, om 00:06 schreef Jan Hubicka:
> > On Mon, Mar 24, 2003 at 09:00:40PM +0100, Steven Bosscher wrote:
> > >
> > > Janis, can you hunt this one?
> >
> > The regression showed up with this patch:
> >
> > Sat Mar 30 14:08:55 CET 2002 Jan Hubicka <jh@suse.cz>
> >
---- 8< ----
> >
> > * i386.c (aligned_operand): Be prepared for SUBREGed registers.
> > (ix86_decompose_address): Use REG_P instead of GET_CODE (...) == REG.
> > (ix86_address_cost): Be prepared for SUBREGed registers.
> > (legitimate_address_p): Accept SUBREGed registers.
> >
> > The hunt used Wolfgang's reduced test case with "-O -fPIC" on
> > i686-pc-linux-gnu.
>
> Tue Mar 25 00:05:27 CET 2003 Jan Hubicka <jh@suse.cz>
> * i386.c (legitimate_address_p): Refuse DImore registers in 32bit compilation.
That patch was vs. mainline. Here is the patch vs. 3.3 (with
a few comment/message typo fixes), bootstrapped and regtested
on i586-pc-linux-gnu (and of course confirmed that the test
case for the PR now compiles with -O2 -fPIC :-)
Tue Mar 25 00:05:27 CET 2003 Jan Hubicka <jh@suse.cz>
* i386.c (legitimate_address_p): Refuse DImore registers
in 32bit compilation.
Index: i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.495.2.19
diff -c -3 -p -r1.495.2.19 i386.c
*** i386.c 16 Mar 2003 20:15:04 -0000 1.495.2.19
--- i386.c 24 Mar 2003 23:58:35 -0000
*************** legitimate_address_p (mode, addr, strict
*** 5451,5456 ****
--- 5451,5464 ----
goto report_error;
}
+ /* We can run out of registers when we do allow subregs
+ of DImode registers. */
+ if (GET_MODE (reg) == DImode && !TARGET_64BIT)
+ {
+ reason = "base reg is DImore";
+ goto report_error;
+ }
+
if ((strict && ! REG_OK_FOR_BASE_STRICT_P (reg))
|| (! strict && ! REG_OK_FOR_BASE_NONSTRICT_P (reg)))
{
*************** legitimate_address_p (mode, addr, strict
*** 5484,5489 ****
--- 5492,5505 ----
if (GET_MODE (index) != Pmode)
{
reason = "index is not in Pmode";
+ goto report_error;
+ }
+
+ /* We can run out of registers when we do allow subregs
+ of DImode registers. */
+ if (GET_MODE (reg) == DImode && ! TARGET_64BIT)
+ {
+ reason = "index reg is DImode";
goto report_error;
}
More information about the Gcc-bugs
mailing list