* local-alloc.c (combine_regs): Handle SUBREG_REG being a MEM.

From-SVN: r47268
This commit is contained in:
Graham Stott 2001-11-22 14:22:09 +00:00 committed by Graham Stott
parent 0bf93a511e
commit 44a5da099e
2 changed files with 44 additions and 22 deletions

View File

@ -1,3 +1,7 @@
2001-11-22 Graham Stott <grahams@redhat.com>
* local-alloc.c (combine_regs): Handle SUBREG_REG being a MEM.
Thu Nov 22 06:49:14 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* config/i386/i386.md (leave, leave_rex64): Have RTL reflect what

View File

@ -1801,20 +1801,29 @@ combine_regs (usedreg, setreg, may_save_copy, insn_number, insn, already_dead)
while (GET_CODE (usedreg) == SUBREG)
{
if (GET_MODE_SIZE (GET_MODE (SUBREG_REG (usedreg))) > UNITS_PER_WORD)
rtx subreg = SUBREG_REG (usedreg);
if (GET_CODE (subreg) == REG)
{
if (GET_MODE_SIZE (GET_MODE (subreg)) > UNITS_PER_WORD)
may_save_copy = 0;
if (REGNO (SUBREG_REG (usedreg)) < FIRST_PSEUDO_REGISTER)
offset += subreg_regno_offset (REGNO (SUBREG_REG (usedreg)),
GET_MODE (SUBREG_REG (usedreg)),
if (REGNO (subreg) < FIRST_PSEUDO_REGISTER)
offset += subreg_regno_offset (REGNO (subreg),
GET_MODE (subreg),
SUBREG_BYTE (usedreg),
GET_MODE (usedreg));
else
offset += (SUBREG_BYTE (usedreg)
/ REGMODE_NATURAL_SIZE (GET_MODE (usedreg)));
usedreg = SUBREG_REG (usedreg);
}
usedreg = subreg;
}
if (GET_CODE (usedreg) != REG)
return 0;
ureg = REGNO (usedreg);
if (ureg < FIRST_PSEUDO_REGISTER)
usize = HARD_REGNO_NREGS (ureg, GET_MODE (usedreg));
@ -1825,20 +1834,29 @@ combine_regs (usedreg, setreg, may_save_copy, insn_number, insn, already_dead)
while (GET_CODE (setreg) == SUBREG)
{
if (GET_MODE_SIZE (GET_MODE (SUBREG_REG (setreg))) > UNITS_PER_WORD)
rtx subreg = SUBREG_REG (setreg);
if (GET_CODE (subreg) == REG)
{
if (GET_MODE_SIZE (GET_MODE (subreg)) > UNITS_PER_WORD)
may_save_copy = 0;
if (REGNO (SUBREG_REG (setreg)) < FIRST_PSEUDO_REGISTER)
offset -= subreg_regno_offset (REGNO (SUBREG_REG (setreg)),
GET_MODE (SUBREG_REG (setreg)),
if (REGNO (subreg) < FIRST_PSEUDO_REGISTER)
offset -= subreg_regno_offset (REGNO (subreg),
GET_MODE (subreg),
SUBREG_BYTE (setreg),
GET_MODE (setreg));
else
offset -= (SUBREG_BYTE (setreg)
/ REGMODE_NATURAL_SIZE (GET_MODE (setreg)));
setreg = SUBREG_REG (setreg);
}
setreg = subreg;
}
if (GET_CODE (setreg) != REG)
return 0;
sreg = REGNO (setreg);
if (sreg < FIRST_PSEUDO_REGISTER)
ssize = HARD_REGNO_NREGS (sreg, GET_MODE (setreg));