This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bug in multiple register reload inheritance?
- From: Ian Lance Taylor <iant at google dot com>
- To: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- Cc: gcc at gcc dot gnu dot org
- Date: 27 Nov 2006 14:21:36 -0800
- Subject: Re: Bug in multiple register reload inheritance?
- References: <20061127000222.GA3563@sygehus.dk>
Rask Ingemann Lambertsen <rask@sygehus.dk> writes:
> Here something has gone wrong, and the parameters to
> subreg_regno_offset() are invalid:
>
> (gdb) frame 1
> #1 0x08504786 in subreg_regno_offset (xregno=9, xmode=HImode, offset=2, ymode=HImode) at rtlanal.c:3017
>
> If I take out the lines 5643 and 5644
>
> if (regno < FIRST_PSEUDO_REGISTER)
> regno = subreg_regno (rld[r].in_reg);
>
> it will instead get regno = 10, mode = SImode and last_reg = (reg:SI 8 si)
> and call subreg_regno_offset (xregno=8, xmode=SImode, offset=2, ymode=HImode)
> which is fine and returns 1.
I have to agree that this looks rather dubious. It seems to me that
when we increment regno in the lines above, we need to reset byte to 0.
This bug, if it is a bug, has been there since this code was
introduced:
Fri Oct 16 20:40:50 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
It seems possible that it could be a bug, since a SUBREG of a hard
register is unusual.
Ian