diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1997-10-07 18:36:48 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1997-10-07 14:36:48 -0400 |
commit | 066c2fea8d3b164eae61698058a85edf6d9fe2b4 (patch) | |
tree | 9bdec7a4f7ae437cc3f487c2c5d586fa965d82b2 /gcc | |
parent | c0da11c40af197cc142294ed2422299e93a00f2e (diff) | |
download | gcc-066c2fea8d3b164eae61698058a85edf6d9fe2b4.zip gcc-066c2fea8d3b164eae61698058a85edf6d9fe2b4.tar.gz gcc-066c2fea8d3b164eae61698058a85edf6d9fe2b4.tar.bz2 |
regclass.c (init_reg_modes): If we can't find a mode for the register, use the previous one.
* regclass.c (init_reg_modes): If we can't find a mode for the
register, use the previous one.
From-SVN: r15862
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/regclass.c | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c7eacd9..fb9cd7c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 7 11:00:42 1997 Jason Merrill <jason@yorick.cygnus.com> + + * regclass.c (init_reg_modes): If we can't find a mode for the + register, use the previous one. + Tue Oct 7 10:55:34 1997 Richard Henderson <rth@cygnus.com> * haifa-sched.c (print_block_visualization): Call fprintf directly, diff --git a/gcc/regclass.c b/gcc/regclass.c index f3bdc7f..2932db1 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -405,14 +405,13 @@ init_reg_modes () { reg_raw_mode[i] = choose_hard_reg_mode (i, 1); - /* If we couldn't find a valid mode, fall back to `word_mode'. - ??? We assume `word_mode' has already been initialized. + /* If we couldn't find a valid mode, just use the previous mode. ??? One situation in which we need to do this is on the mips where HARD_REGNO_NREGS (fpreg, [SD]Fmode) returns 2. Ideally we'd like to use DF mode for the even registers and VOIDmode for the odd (for the cpu models where the odd ones are inaccessible). */ if (reg_raw_mode[i] == VOIDmode) - reg_raw_mode[i] = word_mode; + reg_raw_mode[i] = i == 0 ? word_mode : reg_raw_mode[i-1]; } } |