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: scavanging a reg


  > i need a GPR at epilogue/prologue time so i can load and save to the
  > VRSAVE register (which can only be moved to and fro GPRs).
  > 
  > what's the best route for this?  can i iterate through "regs_ever_live"
  > and get one from there?  i mean, reload is already done so we won't need
  > any more registers.
True, but you also can't make a call-saved register live that wasn't live
before.  So you have to find a call-clobbered register.  

You don't necessarily have to look at regs_ever_live.  You just need to find
a call-clobbered register that you can use in the prologue -- that usually
means any call-clobbered register that is not used for arguments, return
pointers, or other special purpose uses.

jeff


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