This discusses registers that address the stack frame.
FIXED_REGISTERS. On most machines, the hardware determines which register this is.
FRAME_POINTER_REGNUMthe number of a special, fixed register to be used internally until the offset is known, and define
HARD_FRAME_POINTER_REGNUMto be actual the hard register number used for the frame pointer. You should define this macro only in the very rare circumstances when it is not possible to calculate the offset between the frame pointer and the automatic variables until after register allocation has been completed. When this macro is defined, you must also indicate in your definition of
ELIMINABLE_REGShow to eliminate
STACK_POINTER_REGNUM. Do not define this macro if it would be the same as
FIXED_REGISTERS, or arrange to be able to eliminate it (see section Eliminating Frame Pointer and Arg Pointer).
ELIMINABLE_REGSinto either the frame pointer or stack pointer. Do not define this macro unless there is no other way to get the return address from the stack.
STATIC_CHAIN_INCOMING_REGNUM, while the register number as seen by the calling function is
STATIC_CHAIN_REGNUM. If these registers are the same,
STATIC_CHAIN_INCOMING_REGNUMneed not be defined. The static chain register need not be a fixed register. If the static chain is passed in memory, these macros should not be defined; instead, the next two macros should be defined.
memexpressions that denote where they are stored.
STATIC_CHAIN_INCOMINGgive the locations as seen by the calling and called functions, respectively. Often the former will be at an offset from the stack pointer and the latter at an offset from the frame pointer. The variables
arg_pointer_rtxwill have been initialized prior to the use of these macros and should be used to refer to those items. If the static chain is passed in a register, the two previous macros should be defined instead.
Go to the first, previous, next, last section, table of contents.