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 | |
parent | 82be40f7eb85596f2d654e7eeee000972022d344 (diff) | |
download | gcc-ce701d1bd7218c2c055840da396761814cf2fdf6.zip gcc-ce701d1bd7218c2c055840da396761814cf2fdf6.tar.gz gcc-ce701d1bd7218c2c055840da396761814cf2fdf6.tar.bz2 |
Fix computation of need_mode in choose_reload_regs.
From-SVN: r36264
-rw-r--r-- | gcc/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/reload1.c | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6e2837b..288f380 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,6 +2,8 @@ * combine.c (combine_simplify_rtx): Try to simplify VEC_SELECT of a VEC_CONCAT. + From Richard Henderson: + * reload1.c (choose_reload_regs): Compute need_mode properly. 2000-09-07 Richard Henderson <rth@cygnus.com> diff --git a/gcc/reload1.c b/gcc/reload1.c index b09f9eb..fb84047 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 |