This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: order_regs_for_reload ()
- To: grahams <grahams at rcp dot co dot uk>
- Subject: Re: RFC: order_regs_for_reload ()
- From: Bernd Schmidt <bernds at cygnus dot co dot uk>
- Date: Tue, 19 Oct 1999 21:35:55 +0100 (BST)
- cc: gcc at gcc dot gnu dot org
> 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