aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index ce4811a..7f5f355 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -1470,8 +1470,10 @@ push_reload (in, out, inloc, outloc, class,
&& GET_MODE_SIZE (outmode) <= GET_MODE_SIZE (GET_MODE (XEXP (note, 0)))
&& HARD_REGNO_MODE_OK (regno, outmode))
{
- int offs;
- int nregs = HARD_REGNO_NREGS (regno, inmode);
+ unsigned int offs;
+ unsigned int nregs = MAX (HARD_REGNO_NREGS (regno, inmode),
+ HARD_REGNO_NREGS (regno, outmode));
+
for (offs = 0; offs < nregs; offs++)
if (fixed_regs[regno + offs]
|| ! TEST_HARD_REG_BIT (reg_class_contents[(int) class],