AFAIK there is no standard way to get/set the stack pointer.
This is not defined in C.
Usually you end up using inline assembly.
Do you really need to alter the stack pointer directly?
longjmp/setjmp do it explicitly.
The stack pointer is always on the set of saved/restored registers.
This is not defined in C.
Usually you end up using inline assembly.
Do you really need to alter the stack pointer directly?
longjmp/setjmp do it explicitly.
The stack pointer is always on the set of saved/restored registers.