aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@redhat.com>2000-11-02 19:22:04 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2000-11-02 19:22:04 +0000
commit0192d704659dcc776b2365fa03415ce24f5c0af1 (patch)
tree0739d56cb7eafb4b7b799a0124f3a2362d311e43 /gcc/reload.c
parent9473c5226bfe4c2a3d0045028921a00a167e5c40 (diff)
downloadgcc-0192d704659dcc776b2365fa03415ce24f5c0af1.zip
gcc-0192d704659dcc776b2365fa03415ce24f5c0af1.tar.gz
gcc-0192d704659dcc776b2365fa03415ce24f5c0af1.tar.bz2
reload.c (find_equiv_reg): Test all hard registers for membership in the requested class.
* reload.c (find_equiv_reg): Test all hard registers for membership in the requested class. From-SVN: r37207
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c33
1 files changed, 23 insertions, 10 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index f3933b1..57ff486 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -6185,16 +6185,29 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
&& (valtry
= operand_subword (SET_DEST (pat), 1, 0, VOIDmode))
&& (valueno = true_regnum (valtry)) >= 0)))
- if (other >= 0
- ? valueno == other
- : ((unsigned) valueno < FIRST_PSEUDO_REGISTER
- && TEST_HARD_REG_BIT (reg_class_contents[(int) class],
- valueno)))
- {
- value = valtry;
- where = p;
- break;
- }
+ {
+ if (other >= 0)
+ {
+ if (valueno != other)
+ continue;
+ }
+ else if ((unsigned) valueno >= FIRST_PSEUDO_REGISTER)
+ continue;
+ else
+ {
+ int i;
+
+ for (i = HARD_REGNO_NREGS (valueno, mode) - 1; i >= 0; i--)
+ if (! TEST_HARD_REG_BIT (reg_class_contents[(int) class],
+ valueno + i))
+ break;
+ if (i >= 0)
+ continue;
+ }
+ value = valtry;
+ where = p;
+ break;
+ }
}
}