This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Minor reload bug
- To: gcc-patches at gcc dot gnu dot org
- Subject: Minor reload bug
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Thu, 6 Jul 00 18:58:26 EDT
When reusing an input for a reload register, we check to make sure that
all registers are of the proper class for the input, but don't do that if
the output mode is wider. This fixes it.
Thu Jul 6 18:30:36 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* reload.c (push_reload): When seeing if can reuse a register,
check extra registers against widest of INMODE and OUTMODE.
*** reload.c 2000/06/13 21:47:39 1.111
--- reload.c 2000/07/06 21:40:14
*************** push_reload (in, out, inloc, outloc, cla
*** 1471,1476 ****
&& HARD_REGNO_MODE_OK (regno, outmode))
{
! int offs;
! int nregs = HARD_REGNO_NREGS (regno, inmode);
for (offs = 0; offs < nregs; offs++)
if (fixed_regs[regno + offs]
--- 1471,1478 ----
&& HARD_REGNO_MODE_OK (regno, outmode))
{
! unsigned int offs;
! unsigned int nregs = MAX (HARD_REGNO_NREGS (regno, inmode),
! HARD_REGNO_NREGS (regno, outmode));
!
for (offs = 0; offs < nregs; offs++)
if (fixed_regs[regno + offs]