diff options
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 |