diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-05-27 23:29:18 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-05-27 23:29:18 +0000 |
commit | 1f902da9e7f4adcc8d3679330cc9d45c7f3765d0 (patch) | |
tree | 2b880c424efa11c2c8d2cf47b592ab48227c4182 /gcc/regclass.c | |
parent | f2799de72e291e5e7dc93e410b22d18c2b4f298f (diff) | |
download | gcc-1f902da9e7f4adcc8d3679330cc9d45c7f3765d0.tar.gz |
* toplev.c (compile_file): Call init_regs after `word_mode' is valid.
* regclass.c (init_reg_modes): If choose_hard_reg_mode can't find a
valid mode, fall back to word_mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7379 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r-- | gcc/regclass.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c index 2c2c36ff5d3..bef30abe539 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -402,7 +402,18 @@ init_reg_modes () register int i; for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - reg_raw_mode[i] = choose_hard_reg_mode (i, 1); + { + 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. + ??? 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 inaccessable). */ + if (reg_raw_mode[i] == VOIDmode) + reg_raw_mode[i] = word_mode; + } } /* Finish initializing the register sets and |