aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-10-18 19:33:35 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-10-18 19:33:35 -0400
commitaf432130ae43aa872d977e6bda6a9fbe8c83b149 (patch)
tree01848c7c3e12219752a8e640084c57750437225e
parentaeb4bd7d6ec01536f392314d775a93e45a444c84 (diff)
downloadgcc-af432130ae43aa872d977e6bda6a9fbe8c83b149.zip
gcc-af432130ae43aa872d977e6bda6a9fbe8c83b149.tar.gz
gcc-af432130ae43aa872d977e6bda6a9fbe8c83b149.tar.bz2
(reload): Correctly compute group additional needs when the return
register cannot be used as a spill register. From-SVN: r8308
-rw-r--r--gcc/reload1.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 0a2ee20..ae9afb1 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -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 */