Skip to main content

JitContext

Struct JitContext 

Source
pub struct JitContext {
Show 17 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 bb_starts: *const u8, pub bb_len: u32, pub entry_pc: u32, pub pc: u32, pub dispatch_table: *const i32, pub code_base: u64, pub flat_buf: *mut u8, pub flat_perms: *const u8, pub fast_reentry: u32, /* private fields */
}
Expand description

JIT execution context passed to compiled code via R15. Must be #[repr(C)] with exact field ordering matching codegen offsets.

Fields§

§regs: [u64; 13]

PVM registers (offset 0, 13 × 8 = 104 bytes).

§gas: i64

Gas counter (offset 104). Signed to detect underflow.

§exit_reason: u32

Exit reason code (offset 112).

§exit_arg: u32

Exit argument (offset 116) — host call ID, page fault addr, etc.

§heap_base: u32

Heap base address (offset 120).

§heap_top: u32

Current heap top (offset 124).

§jt_ptr: *const u32

Jump table pointer (offset 128).

§jt_len: u32

Jump table length (offset 136).

§bb_starts: *const u8

Basic block starts pointer (offset 144).

§bb_len: u32

Basic block starts length (offset 152).

§entry_pc: u32

Entry PC for re-entry after host calls (offset 160).

§pc: u32

Current PC when execution stopped (offset 164).

§dispatch_table: *const i32

Dispatch table: PVM PC → native code offset (offset 168).

§code_base: u64

Base address of native code (offset 176).

§flat_buf: *mut u8

Flat guest memory buffer base pointer (offset 184).

§flat_perms: *const u8

Permission table base pointer (offset 192).

§fast_reentry: u32

Fast re-entry flag (offset 200).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more