toplev.c (compile_file): Call init_regs after `word_mode' is valid.

* 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.

From-SVN: r7379
This commit is contained in:
Doug Evans 1994-05-27 23:29:18 +00:00
parent 0304dfbb67
commit 7f21d440de
2 changed files with 13 additions and 2 deletions

View File

@ -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

View File

@ -2026,9 +2026,9 @@ compile_file (name)
/* Some of these really don't need to be called when generating bytecode,
but the options would have to be parsed first to know that. -bson */
init_rtl ();
init_regs ();
init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL
|| debug_info_level == DINFO_LEVEL_VERBOSE);
init_regs ();
init_decl_processing ();
init_optabs ();
init_stmt ();