> >> 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