aboutsummaryrefslogtreecommitdiff
path: root/gcc/regclass.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-02-24 13:17:04 +0000
committerJeff Law <law@gcc.gnu.org>1999-02-24 06:17:04 -0700
commit46f40127a279a44341defa54a2410d7a95738346 (patch)
tree0c67dbf28427a3da25928be7bb0f90340b0645fa /gcc/regclass.c
parentc99f8c2a3e3a5a81f3bec3c1fd3a080343bd57d1 (diff)
downloadgcc-46f40127a279a44341defa54a2410d7a95738346.zip
gcc-46f40127a279a44341defa54a2410d7a95738346.tar.gz
gcc-46f40127a279a44341defa54a2410d7a95738346.tar.bz2
regclass.c (record_reg_classes, case 'p'): Set classes appropriately.
* regclass.c (record_reg_classes, case 'p'): Set classes appropriately. An alternative always fails if it needs a pseudo and no suitable register class can be found. Bootstrapped on solaris. From-SVN: r25402
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r--gcc/regclass.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 9faf8ab..57be118 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -1268,6 +1268,12 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn)
case 'p':
allows_addr = 1;
win = address_operand (op, GET_MODE (op));
+ /* We know this operand is an address, so we want it to be
+ allocated to a register that can be the base of an
+ address, ie BASE_REG_CLASS. */
+ classes[i]
+ = reg_class_subunion[(int) classes[i]]
+ [(int) BASE_REG_CLASS];
break;
case 'm': case 'o': case 'V':
@@ -1399,7 +1405,12 @@ record_reg_classes (n_alts, n_ops, ops, modes, constraints, insn)
{
if (classes[i] == NO_REGS)
{
- if (! allows_addr)
+ /* We must always fail if the operand is a REG, but
+ we did not find a suitable class.
+
+ Otherwise we may perform an uninitialized read
+ from this_op_costs after the `continue' statement
+ below. */
alt_fail = 1;
}
else