------- Comment #4 from paolo dot bonzini at lu dot unisi dot ch 2006-04-12 14:09 ------- Subject: Re: [4.2 Regression] gcc fails to build on sh64-elf targets
> I think the best solution is to have an INDEX_REG_CLASS_FOR_MODE macro, > which defaults to INDEX_REG_CLASS. Then this macro can be defined for the > SH to return GENERAL_REGS for DImode when compiling SHmedia code. > Thanks for the analysis. I quickly tested that your approach works for Kaz's testcase. However I don't feel confident enough to write this patch though -- and even less to document it. Are you going to do it, or should I go on and revert the regclass.c change? This is what I tested BTW: Index: reload.c =================================================================== --- reload.c (revision 112658) +++ reload.c (working copy) @@ -5316,7 +5316,7 @@ find_reloads_address_1 (enum machine_mod RTX_CODE code = GET_CODE (x); if (context == 1) - context_reg_class = INDEX_REG_CLASS; + context_reg_class = GET_MODE (x) == DImode ? GENERAL_REGS : INDEX_REG_CLASS; else context_reg_class = base_reg_class (mode, outer_code, index_code); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27117