[OR1K port] where do I change the function frame structure

Jim Wilson jim.wilson@linaro.org
Thu May 7 05:40:00 GMT 2015


On 05/05/2015 05:19 PM, Peter T. Breuer wrote:
> Please ..  where (in what file, dir) of the gcc (4.9.1) source should I
> rummage in order to change the sequence of instructions eventually
> emitted to do a function call?

Are you trying to change the caller or the callee?

For the callee, or1k_compute_frame_size calculates the frame size, which 
depends on the frame layout.  or1k_expand_prologue emits the RTL for the 
prologue.  or1k_expand_epilogue emits the RTL for the epilogue.  There 
are also a few other closely related helper functions.  These are all in 
gcc/config/or1k/or1k.c.

For the caller, I see that the or1k port already sets 
ACCUMULATE_OUTGOING_ARGS, so there should be no stack pointer inc/dec 
around a call.  Only in the prologue/epilogue.

Jim



More information about the Gcc mailing list