diff options
author | Bernd Schmidt <bernds@redhat.co.uk> | 2000-09-08 09:41:07 +0000 |
---|---|---|
committer | Bernd Schmidt <crux@gcc.gnu.org> | 2000-09-08 09:41:07 +0000 |
commit | ce701d1bd7218c2c055840da396761814cf2fdf6 (patch) | |
tree | ee0af2c78bba9dd0a0782764cd3101f0cb7d711f /gcc/reload1.c | |
parent | 82be40f7eb85596f2d654e7eeee000972022d344 (diff) | |
download | gcc-ce701d1bd7218c2c055840da396761814cf2fdf6.tar.gz |
Fix computation of need_mode in choose_reload_regs.
From-SVN: r36264
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index b09f9eb8222..fb840477ba7 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -5304,8 +5304,13 @@ choose_reload_regs (chain) i = REGNO (last_reg) + word; last_class = REGNO_REG_CLASS (i); - need_mode = smallest_mode_for_size ((word+1) * UNITS_PER_WORD, - GET_MODE_CLASS (mode)); + if (word == 0) + need_mode = mode; + else + need_mode + = smallest_mode_for_size (GET_MODE_SIZE (mode) + + word * UNITS_PER_WORD, + GET_MODE_CLASS (mode)); if ( #ifdef CLASS_CANNOT_CHANGE_MODE |