This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FUNCTION_OK_FOR_SIBCALL vs INITIAL_FRAME_POINTER_OFFSET


> >> 	scratchslot = argument
> >> 	argument = stack frame size - small
> >> 	sp += argument
> >> 	argument = scratchslot
> >> 	sp += small
> >
> > This assumes you have a frame pointer or sp+large_offset addressing mode
> > for accessing scratchslot. In which case you could either use fp as
> > scratch storage or probably have an add sp, large_offset instruction.
> >
> > Paul
> >
>   :)  OK, I'll allocate a successive series of scratchslots every 32k all
>   : the
>
> way up the stack and bounce the (continuously-reducing) frame size argument
> from one to the next until we get within range of the top!

Or use 2 scratch regs:

sp[0] = tmp1;
tmp1 = #(framesize - small)
sp[tmp1] = tmp2;
tmp2 = tmp1;
tmp1 = sp[0];
sp += tmp2;
tmp2 = sp[0];
sp += #small;

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]