From 16ab191f302f5915199dec8c6893d88482bce7af Mon Sep 17 00:00:00 2001 From: Denis Chertykov Date: Sun, 23 Apr 2000 22:25:25 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/reload.c | 16 ++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3b03137e573..92970069255 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sun Apr 23 16:24:35 2000 Denis Chertykov + + * reload.c (find_equiv_reg): Checks all valueno regs + as a reload_reg_p regs. + 2000-04-23 Zack Weinberg * cpphash.c (collect_objlike_expansion): Add sanity check. diff --git a/gcc/reload.c b/gcc/reload.c index 80df0e46236..4a3560257b9 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. */