This is the mail archive of the
mailing list for the GCC project.
Re: [OR1K port] where do I change the function frame structure
- From: Jim Wilson <jim dot wilson at linaro dot org>
- To: ptb at inv dot it dot uc3m dot es, gcc at gcc dot gnu dot org
- Date: Wed, 06 May 2015 22:40:14 -0700
- Subject: Re: [OR1K port] where do I change the function frame structure
- Authentication-results: sourceware.org; auth=none
- References: <201505060019 dot t460JkN1008433 at nbd dot it dot uc3m dot es>
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
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.