Re: Is there stack associated when a executing an inline function?



On Feb 29, 11:08 am, jacob navia <ja...@xxxxxxxxxx> wrote:
It would be completely weird that in an inline procedure the compiler
would save the current stack pointer and establish a new stack
frame since there is no function call.

However, it wouldn't be weird at all if the inlined procedure simply
moves the stack pointer by some delta to enlarge the current frame,
then references all of its locals with respect to the current frame,
and then moves the stack pointer back by the same delta upon
termination to release the storage.
.



Relevant Pages

  • Re: Is there stack associated when a executing an inline function?
    ... moves the stack pointer by some delta to enlarge the current frame, ... then references all of its locals with respect to the current frame, ...
    (comp.lang.c)
  • Re: Is there stack associated when a executing an inline function?
    ... moves the stack pointer by some delta to enlarge the current frame, ... then references all of its locals with respect to the current frame, ... Multiple inlined functions can use the same stack space without ...
    (comp.lang.c)
  • Re: Is there stack associated when a executing an inline function?
    ... moves the stack pointer by some delta to enlarge the current frame, ... then references all of its locals with respect to the current frame, ...
    (comp.lang.c)
  • Re: need help with stack pointers
    ... subtract the offset value from the current stack pointer value to get the ... You can see evidence of this when the BSR instruction subtracts from the stack pointer as it pushes a return address, and the RTS instruction adds to the stack pointer as it pops that address back into PC. ... So if you're going to establish a frame on "top" of such a stack, you have to avoid the higher addresses which are already in use, and put your frame in locations below the current SP value. ... It would be possible to locate a "frame base" one frame size below the SP value, get that in a register, and index up from there, but that wastes a register for no benefit. ...
    (comp.arch.embedded)
  • Re: [9fans] pointer to the last TOS
    ... the stack pointer is there. ... a positive offset from ... pointer to the virtual frame pointer to find the return address. ...
    (comp.os.plan9)