PREV UP NEXT Using and Porting GNU CC

16.7.8: Caller-Saves Register Allocation

If you enable it, GNU CC can save registers around function calls. This makes it possible to use call-clobbered registers to hold variables that must live across calls.

DEFAULT_CALLER_SAVES
Define this macro if function calls on the target machine do not preserve any registers; in other words, if CALL_USED_REGISTERS has 1 for all registers. This macro enables `-fcaller-saves' by default. Eventually that option will be enabled by default on all machines and both the option and this macro will be eliminated.
CALLER_SAVE_PROFITABLE (refs, calls)
A C expression to determine whether it is worthwhile to consider placing a pseudo-register in a call-clobbered hard register and saving and restoring it around each function call. The expression should be 1 when this is worth doing, and 0 otherwise.

If you don't define this macro, a default is used which is good on most machines: 4 * calls < refs.