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: New register allocator branch created (fwd)


>Here's the thing, reload doesn't fix it.
>It gets output into asm, and you get an assembler error saying it can't be
>used as an index register.
>Is *this* a bug?

Since this problem has only shown up with the new register allocator, it might 
be a problem with the interface between the new register allocator and reload.
It is possible that it is a bug in reload or in the i386 back end.

To find out, you can try putting a breakpoint in find_reloads (), make it
conditional on the insn number of the bad insn, and then step through it.
You may hit it multiple times since reload may have to call it again if a
register is spilled.  Each time it is called, particularly the last time,
it should call push_reload to generate a reload.  Since this is an address
reg, this might happen in find_reloads_address.  Then make sure that the
reloads actually gets performed in reload_as_needed after the last find_reloads
call.  If it is a register replacement, it should happen in subst_reloads ().
If it is a memory replacement, it will happen near the end of reload ().
Search for 
  /* Now eliminate all pseudo regs by modifying them into
     their equivalent memory references.
If you need new instructions, then they will come from emit_reload_insns which
is called before subst_reloads.

Jim

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