pub enum AbiClass {
CallerSaved,
CalleeSaved,
Special,
}
Expand description
ABI classification for registers based on preservation requirements.
This simplified classification focuses on whether registers need to be preserved across function calls, which is the most critical information for JIT compilation and register allocation.
Variants§
CallerSaved
Caller-saved registers that don’t need to be preserved across calls.
These registers can be freely used by JIT-compiled functions without saving/restoring their values. Examples: argument registers, temp registers.
CalleeSaved
Callee-saved registers that must be preserved across calls.
If a JIT-compiled function uses these registers, it must save their values on entry and restore them before returning. Examples: saved registers.
Special
Special-purpose registers with specific ABI requirements.
These registers have specific roles (stack pointer, frame pointer, zero register, etc.) and require careful handling. Generally should be avoided in JIT code unless specifically needed for their intended purpose.