aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Chertykov <denisc@overta.ru>2000-04-23 22:25:25 +0000
committerJeff Law <law@gcc.gnu.org>2000-04-23 16:25:25 -0600
commit16ab191f302f5915199dec8c6893d88482bce7af (patch)
tree41a0bcd659d6a5dd6e6bff75419918cdf8a7b265
parenta6a69fc2ad1062fab2801e42aca04af23470365b (diff)
downloadgcc-16ab191f302f5915199dec8c6893d88482bce7af.zip
gcc-16ab191f302f5915199dec8c6893d88482bce7af.tar.gz
gcc-16ab191f302f5915199dec8c6893d88482bce7af.tar.bz2
reload.c (find_equiv_reg): Checks all valueno regs as a reload_reg_p regs.
* reload.c (find_equiv_reg): Checks all valueno regs as a reload_reg_p regs. From-SVN: r33361
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/reload.c16
2 files changed, 15 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3b03137..9297006 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Sun Apr 23 16:24:35 2000 Denis Chertykov <denisc@overta.ru>
+
+ * reload.c (find_equiv_reg): Checks all valueno regs
+ as a reload_reg_p regs.
+
2000-04-23 Zack Weinberg <zack@wolery.cumb.org>
* cpphash.c (collect_objlike_expansion): Add sanity check.
diff --git a/gcc/reload.c b/gcc/reload.c
index 80df0e4..4a35602 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -6112,18 +6112,22 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
&& regno < valueno + (int) HARD_REGNO_NREGS (valueno, mode))
return 0;
+ nregs = HARD_REGNO_NREGS (regno, mode);
+ valuenregs = HARD_REGNO_NREGS (valueno, mode);
+
/* Reject VALUE if it is one of the regs reserved for reloads.
Reload1 knows how to reuse them anyway, and it would get
confused if we allocated one without its knowledge.
(Now that insns introduced by reload are ignored above,
this case shouldn't happen, but I'm not positive.) */
- if (reload_reg_p != 0 && reload_reg_p != (short *) (HOST_WIDE_INT) 1
- && reload_reg_p[valueno] >= 0)
- return 0;
-
- nregs = HARD_REGNO_NREGS (regno, mode);
- valuenregs = HARD_REGNO_NREGS (valueno, mode);
+ if (reload_reg_p != 0 && reload_reg_p != (short *) (HOST_WIDE_INT) 1)
+ {
+ int i;
+ for (i = 0; i < valuenregs; ++i)
+ if (reload_reg_p[valueno + i] >= 0)
+ return 0;
+ }
/* Reject VALUE if it is a register being used for an input reload
even if it is not one of those reserved. */