[ Home ]
SBCL Internals

The pages on this CLiki-driven site can be edited by anybody at any time. No warranty of any kind can therefore be made; any implied warranties of merchantability or fitness for a particular purpose are expressly disclaimed
[ Home ] [ Recent Changes ] [ About CLiki ] [ Text Formatting ]

The control stack is where all the function arguments and suchlike get stored and dropped when you call functions and return from them.

The x86 has a paucity of registers, and points the hardware stack pointer at its control stack so it can use the push and pop instructions to deal with it. This means that its control stack grows downwards, and also ends up with signal contexts and suchlike on it.

Users of other CPUs are more fortunate. CSP, CFP, OCFP are general-purpose registers given over to control stack pointer, control frame pointer and previous control frame pointer. On these ports, the control stack grows upwards. Also as the official ABI's stack (the number stack) is left available and still has the official ABI stack pointer pointing to it, signal handlers and alien calls will end up there instead of here - so we know that everything on the control stack is a descriptor and can be GCed

Suggestion to cliki authors: to avoid confusion when talking about control stack manipulation, use the words "earlier" (for data that were stacked earlier) and "later" (for more recently added items) instead of "higher" or "lower"


This page is linked from: Calling Convention   Memory Map   number stack   Registers   SB  

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively