From 066c2fea8d3b164eae61698058a85edf6d9fe2b4 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 7 Oct 1997 18:36:48 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/regclass.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c7eacd955ed..fb9cd7cf332 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 7 11:00:42 1997 Jason Merrill + + * 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 * haifa-sched.c (print_block_visualization): Call fprintf directly, diff --git a/gcc/regclass.c b/gcc/regclass.c index f3bdc7ff997..2932db13810 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]; } } -- 2.30.2