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: Only hard regs with pseudos considered for save/restore across calls?


> > It appears to me that only pseudos that are allocated to hard registers that
> > are clobbered across calls are saved and restored across calls, and hard
> > registers that are never associated with a pseudo are not saved and restored
> > even when the compiler knows they are clobbered across a call.
> 
> Correct.

OK, thanks for confirming my suspicion.

How much work do you feel it would be to change this so that (at least
optionally) EVERY hard register that is clobbered across a function
call gets preserved?  I.E. should a gcc guru be able to do in one day,
one week, or one month?

Are there any obvious undesirable side effects of making such a change?

> > However since cc0 gets directly allocated to $mcc0 at RTL generation time,
> > it never gets saved and restored.
> 
> Well, don't do that then.

That is also a possibility, depending upon the answers to the above.

Thanks!

-Fred


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