1pub const OFF_REGISTER_COUNT: i32 = 8;
5pub const OFF_PC: i32 = 12;
6pub const OFF_BUDGET: i32 = 16;
7pub const OFF_FUNCTION: i32 = 20;
8pub const OFF_EXIT_KIND: i32 = 24;
9pub const OFF_RETURN_REG: i32 = 28;
10pub const OFF_CALL_DEPTH: i32 = 32;
11pub const OFF_CALL_STACK: i32 = 40;
12
13pub const MAX_JIT_CALL_DEPTH: usize = 32;
15
16#[repr(C)]
18#[derive(Clone, Copy, Debug)]
19pub struct JitCallRecord {
20 pub return_pc: u32,
21 pub return_function: u32,
22 pub dest_reg: u32,
23 pub caller_register_count: u32,
24}
25
26#[repr(C)]
32pub struct JitFrame {
33 pub slots: *mut i64,
34 pub register_count: u32,
35 pub pc: u32,
36 pub budget: u32,
37 pub function: u32,
38 pub exit_kind: u32,
39 pub return_reg: u32,
40 pub call_depth: u32,
41 pub call_stack: *mut JitCallRecord,
42}
43
44pub type JitEntry = unsafe extern "C" fn(*mut JitFrame);