pub struct DecodedInst {
pub opcode: Opcode,
pub ra: u8,
pub rb: u8,
pub rd: u8,
pub imm1: u64,
pub imm2: u64,
pub pc: u32,
pub next_pc: u32,
pub next_idx: u32,
pub target_idx: u32,
pub bb_gas_cost: u32,
}Expand description
Pre-decoded instruction for the fast interpreter / JIT path.
Flattened representation: all operands stored directly (no enum discrimination at runtime). 40 bytes.
Fields§
§opcode: Opcode§ra: u8Register A (first register operand, context-dependent).
rb: u8Register B (second register operand, context-dependent).
rd: u8Register D (destination register, context-dependent).
imm1: u64First immediate / offset value.
imm2: u64Second immediate / offset value.
pc: u32Byte offset of this instruction in the code.
next_pc: u32Byte offset of the next sequential instruction.
next_idx: u32Pre-resolved instruction index for the next sequential instruction.
target_idx: u32Pre-resolved instruction index for the branch/jump target.
u32::MAX = invalid (out-of-program target).
bb_gas_cost: u32Gas cost to charge at gas-block entry (0 for non-gas-block-start instructions). Gas blocks = {PC=0} ∪ {post-terminator PCs}; branch targets are NOT gas-block starts.
Trait Implementations§
Source§impl Clone for DecodedInst
impl Clone for DecodedInst
Source§fn clone(&self) -> DecodedInst
fn clone(&self) -> DecodedInst
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more