diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-05-14 04:22:03 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-05-14 04:22:03 +0000 |
commit | 43c0f12fb6baf23e4d67ab34275c9f46f6525a0e (patch) | |
tree | 00ce726b077cb3e8bf7bbf8f742d2dbd28b92de9 /gcc/caller-save.c | |
parent | 05a99dc82e773ff745d36bdaa7bcdb4107ebc169 (diff) | |
download | gcc-43c0f12fb6baf23e4d67ab34275c9f46f6525a0e.tar.gz |
(restore_referenced_regs): New variable saveregs
which is number of regs to save at a time, instead of numregs,
which is total number of registers to save.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4445 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/caller-save.c')
-rw-r--r-- | gcc/caller-save.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/caller-save.c b/gcc/caller-save.c index db49610e370..ecdc20aa600 100644 --- a/gcc/caller-save.c +++ b/gcc/caller-save.c @@ -605,13 +605,15 @@ restore_referenced_regs (x, insn, insn_mode) else if (regno < FIRST_PSEUDO_REGISTER) { - int numregs = MIN (HARD_REGNO_NREGS (regno, GET_MODE (x)), - MOVE_MAX / UNITS_PER_WORD); + int numregs = HARD_REGNO_NREGS (regno, GET_MODE (x)); + /* Save at most SAVEREGS at a time. This can not be larger than + MOVE_MAX, because that causes insert_save_restore to fail. */ + int saveregs = MIN (numregs, 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, numregs); + i += insert_save_restore (insn, 0, i, insn_mode, saveregs); } return; |