This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in multiple register reload inheritance?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]