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]
Other format: [Raw text]

Re: Bug in mark_referenced_regs?


   From: Mark Mitchell <mark@codesourcery.com>
   Date: Wed, 26 Jun 2002 22:27:31 -0700
   
   I can try to get a test case with the current sources, but I'm still
   sort-of at the conceptual stage.  It just seems to me that if you set
   a register, we should remove it from hard_regs_saved at that point, and
   I don't see any code (even in the current sources) that does that.

How this code appears to work is that it walks the chain, when it hits
a call it pops the appropriate live_throughout registers to the stack
right before the call then restores such live registers as they are
referenced after the call.

Your quoted RTL doesn't show where the CALL is in relation to the
SET and the reference, you also didn't show where R2 was popped
to the stack and where it was restored.

All of that information is needed to diagnose this :-)

Even without this information, I would guess that while n_regs_saved
is set, each INSN should be scanned via note_stores and any matching
reg in hard_regs_saved should it's bit cleared and n_regs_saved
decremented as appropriate.


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