Re: how to configure GCC to have caller save registers instead of callee prologue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 5, 2019 at 4:53 PM Florian Weimer <fw@xxxxxxxxxxxxx> wrote:
>
> * William Tambe:
>
> > Is there a way to configure GCC so that before a function call, the
> > caller save any registers that it is using, instead of the callee
> > prologue saving registers that it is using ?
>
> How is that different from an ordinary volatile/caller-saved register?
> Do you need a way to change an existing target ABI in this way?  In
> general, I think this will require patching of target code, and there
> will be some loss of functionality.

I am working on porting GCC to a new target, and it is the behavior
that I have in mind for its ABI.

I am not sure how different it is from an ordinary
volatile/caller-saved register, however I would like to configure GCC
so that the prologue never need to use code similar to the following
as the caller would have saved all registers that it is using:
#define MUST_SAVE_REGISTER(R)            \
  !fixed_regs[R] &&                      \
  df_regs_ever_live_p (R) &&             \
  !call_used_regs[R])

Pointers on how to implement such a behavior would be much appreciated.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux