This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: scavanging a reg
- To: Aldy Hernandez <aldyh at redhat dot com>
- Subject: Re: scavanging a reg
- From: law at redhat dot com
- Date: Tue, 13 Nov 2001 11:25:52 -0500
- Cc: gcc at gcc dot gnu dot org
- Reply-to: law at redhat dot com
> 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