This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFC: order_regs_for_reload ()


> I took a look at the routine order_regs_for_reload ()
> in gcc/reload1.c to see why I was getting the "fixed or forbidden 
> register spilled this may be due to a bad asm or compiler error" 
> abort on code with no asm.
> 
> My abort was because gcc only had the `bad_spill_regs' left
> in the potential_reload_regs[] array when it tried to select
> a new spill register.
> 
> The last loop in order_regs_for_reload() adds the all 
> `bad_spill_regs' to the potential_reload_regs[] array.
>  
> What I don't understand is why the bad_spill_regs are added to 
> potential_reload_regs array. Any attempt to select one of these
> registers as a spill register is going to result an abort.
> 
> Anyway I decided to experiment and changed the assignment in the 
> last loop to set the potential_reload_regs[] to -1 rather than 
> one of the `bad_spill_reg' registers..
> 
> I now get a more meaningful "Couldn't find spill register" abort
> and not the original "fixed or forbidden register spilled ..." abort.

It shouldn't really matter either way.  You'll get an abort in both
cases - your problem is that you weren't able to use any of the
non-bad_spill_regs for the reload.


Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]