Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

register spilling

Keeping a value in a stack slot because no register is free for it, storing it there and loading it back when it is needed.

Spilling assigns a value's live range (or part of it) to a stack slot, inserting a store after its definition and loads before its uses; the inserted instructions are spill code.

Examples

  • With more live values than registers, the compiler stores one at [rsp + 8] and loads it back when it is needed.

Read the full section →