Commit 19301310 by Jim Wilson

(CEIL): Delete.

(restore_referenced_regs): New var NUMREGS.  Pass NUMREGS to
insert_save_restore instead of using using CEIL.

From-SVN: r3427
parent 0b298be4
......@@ -28,8 +28,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "reload.h"
#include "expr.h"
#define CEIL(x,y) (((x) + (y) - 1) / (y))
/* Modes for each hard register that we can save. The smallest mode is wide
enough to save the entire contents of the register. When saving the
register because it is live we first try to save in multi-register modes.
......@@ -604,12 +602,13 @@ restore_referenced_regs (x, insn, insn_mode)
else if (regno < FIRST_PSEUDO_REGISTER)
{
int endregno = regno + HARD_REGNO_NREGS (regno, GET_MODE (x));
int numregs = MIN (HARD_REGNO_NREGS (regno, GET_MODE (x)),
MOVE_MAX / UNITS_PER_WORD);
int endregno = regno + numregs;
for (i = regno; i < endregno; i++)
if (TEST_HARD_REG_BIT (hard_regs_need_restore, i))
i += insert_save_restore (insn, 0, i, insn_mode,
CEIL (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD));
i += insert_save_restore (insn, 0, i, insn_mode, numregs);
}
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment