Skip to main content

reg_is_spilled

Function reg_is_spilled 

Source
pub const fn reg_is_spilled(x: u8) -> bool
Expand description

True iff x is a spilled register — x3 or x4, the two GPRs that map to the high slots (13, 14). They are real, fully-valid registers (the interpreter executes them as ordinary GPRs), but the x86-64 recompiler’s host register file is exhausted by the other 13 slots, so it holds x3/x4 in memory and materialises them per access. The recompiler uses this to route an x3/x4 instruction to its cold spill path; the gas model uses it to charge the memory-spill cost.