#[repr(C)]pub struct JitContext {Show 21 fields
pub regs: [u64; 13],
pub gas: i64,
pub exit_reason: u32,
pub exit_arg: u32,
pub heap_base: u32,
pub heap_top: u32,
pub jt_ptr: *const u32,
pub jt_len: u32,
pub _pad0: u32,
pub bb_starts: *const u8,
pub bb_len: u32,
pub _pad1: u32,
pub entry_pc: u32,
pub pc: u32,
pub dispatch_table: *const i32,
pub code_base: u64,
pub flat_buf: *mut u8,
pub fast_reentry: u32,
pub _pad2: u32,
pub max_heap_pages: u32,
pub _pad3: u32,
}Expand description
JIT execution context passed to compiled code via R15.
Must be #[repr(C)] with exact field ordering matching the
CTX_* offset constants in codegen.
Fields§
§regs: [u64; 13]PVM registers (offset 0, 13 × 8 = 104 bytes).
gas: i64Gas counter (offset 104). Signed to detect underflow.
exit_reason: u32Exit reason code (offset 112).
exit_arg: u32Exit argument (offset 116) — host call ID, page fault addr, etc.
heap_base: u32Heap base address (offset 120).
heap_top: u32Current heap top (offset 124).
jt_ptr: *const u32Jump table pointer (offset 128).
jt_len: u32Jump table length (offset 136).
_pad0: u32§bb_starts: *const u8Basic block starts pointer (offset 144).
bb_len: u32Basic block starts length (offset 152).
_pad1: u32§entry_pc: u32Entry PC for re-entry after host calls (offset 160).
pc: u32Current PC when execution stopped (offset 164).
dispatch_table: *const i32Dispatch table: PVM PC → native code offset (offset 168).
code_base: u64Base address of native code (offset 176).
flat_buf: *mut u8Flat guest memory buffer base pointer (offset 184).
fast_reentry: u32Fast re-entry flag.
_pad2: u32§max_heap_pages: u32Maximum heap pages — grow_heap refuses beyond this.
_pad3: u32