Advancing SP on a call

2010-03-10 Thread Frank Isamov
We have a problem with arguments passing in memory. The caller puts the arguments in memory relative to the sp: add sp, 4 // allocate space for the argument. stack grows up store r1, (sp-4) // store the argument on the stack call xxx// call the function. In xxx the result

Re: Advancing SP on a call

2010-03-10 Thread Richard Henderson
On 03/10/2010 09:02 AM, Frank Isamov wrote: How can I tell GCC that that the callee should load from the original offset + 4? You'll want to set FIRST_PARM_OFFSET and INCOMING_FRAME_SP_OFFSET. r~