(reload): Correctly compute group additional needs when the return

register cannot be used as a spill register.

From-SVN: r8308
This commit is contained in:
Richard Kenner 1994-10-18 19:33:35 -04:00
parent aeb4bd7d6e
commit af432130ae

View File

@ -1350,19 +1350,14 @@ reload (first, global, dumpfile)
}
/* Now count extra regs if there might be a conflict with
the return value register.
the return value register. */
??? This is not quite correct because we don't properly
handle the case of groups, but if we end up doing
something wrong, it either will end up not mattering or
we will abort elsewhere. */
for (r = regno; r < regno + nregs; r++)
if (spill_reg_order[r] >= 0)
for (i = 0; i < N_REG_CLASSES; i++)
if (TEST_HARD_REG_BIT (reg_class_contents[i], r))
{
if (basic_needs[i] > 0 || basic_groups[i] > 0)
if (basic_needs[i] > 0)
{
enum reg_class *p;
@ -1371,6 +1366,15 @@ reload (first, global, dumpfile)
while (*p != LIM_REG_CLASSES)
insn_needs.other.regs[0][(int) *p++]++;
}
if (basic_groups[i] > 0)
{
enum reg_class *p;
insn_needs.other.groups[i]++;
p = reg_class_superclasses[i];
while (*p != LIM_REG_CLASSES)
insn_needs.other.groups[(int) *p++]++;
}
}
}
#endif /* SMALL_REGISTER_CLASSES */