From: Richard Kenner Date: Thu, 6 Jul 2000 22:26:17 +0000 (+0000) Subject: reload.c (push_reload): When seeing if can reuse a register... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db30db99382a43a9469489a3b7b46f8d249838ab;p=gcc.git reload.c (push_reload): When seeing if can reuse a register... * reload.c (push_reload): When seeing if can reuse a register, check extra registers against widest of INMODE and OUTMODE. From-SVN: r34891 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e19fd04fcf4..8c4b344fdc4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 6 18:30:36 2000 Richard Kenner + + * reload.c (push_reload): When seeing if can reuse a register, + check extra registers against widest of INMODE and OUTMODE. + 2000-07-06 Neil Booth * cpplib.c: (_cpp_parse_assertion): Perform hash lookups diff --git a/gcc/reload.c b/gcc/reload.c index ce4811a7b40..7f5f35577a7 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],