Commit 066c2fea by Jason Merrill Committed by Jason Merrill

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
parent c0da11c4
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> Tue Oct 7 10:55:34 1997 Richard Henderson <rth@cygnus.com>
* haifa-sched.c (print_block_visualization): Call fprintf directly, * haifa-sched.c (print_block_visualization): Call fprintf directly,
......
...@@ -405,14 +405,13 @@ init_reg_modes () ...@@ -405,14 +405,13 @@ init_reg_modes ()
{ {
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'. /* If we couldn't find a valid mode, just use the previous mode.
??? We assume `word_mode' has already been initialized.
??? One situation in which we need to do this is on the mips where ??? 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 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 to use DF mode for the even registers and VOIDmode for the odd
(for the cpu models where the odd ones are inaccessible). */ (for the cpu models where the odd ones are inaccessible). */
if (reg_raw_mode[i] == VOIDmode) 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];
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment