Bug in mark_referenced_regs?
Mark Mitchell
mark@codesourcery.com
Thu Jun 27 00:32:00 GMT 2002
yI'm looking at a problem that seems to step from caller-save.c.
In particular, I've got:
(set (reg:SI r2) ...)
(.... (reg:SI r2) ...) ; A use of r2.
Caller-save.c decides to restore r2 right before the call. The only
problem is that it does that *after* the set, effectively throwing out
the value of the set.
In save_call_clobbered_regs (which despite its name also restores
call-clobberred regs), there is no code to remove registers written to
from hard_regs_saved.
(You might ask why we're saving and restoring r2. That's complicated.
r2 starts out as a subreg of a DI mode register, before register
allocation, which seems to perplex life analysis somewhat.)
Thoughts?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc
mailing list