pub trait InstructionExt {
Show 16 methods
// Required methods
fn opcode(&self) -> OpCode;
fn arg_a(&self) -> i32;
fn arg_b(&self) -> i32;
fn arg_c(&self) -> i32;
fn arg_k(&self) -> i32;
fn arg_ax(&self) -> i32;
fn arg_bx(&self) -> i32;
fn arg_s_b(&self) -> i32;
fn arg_s_c(&self) -> i32;
fn arg_s_j(&self) -> i32;
fn arg_s_bx(&self) -> i32;
fn test_k(&self) -> bool;
fn test_a_mode(&self) -> bool;
fn is_mm_mode(&self) -> bool;
fn is_vararg_prep(&self) -> bool;
fn is_in_top(&self) -> bool;
}Expand description
Instruction accessor extension trait. Per-mode decode helpers, with
bodies derived from lopcodes.h macro shapes.
Required Methods§
fn opcode(&self) -> OpCode
fn arg_a(&self) -> i32
fn arg_b(&self) -> i32
fn arg_c(&self) -> i32
fn arg_k(&self) -> i32
fn arg_ax(&self) -> i32
fn arg_bx(&self) -> i32
fn arg_s_b(&self) -> i32
fn arg_s_c(&self) -> i32
fn arg_s_j(&self) -> i32
fn arg_s_bx(&self) -> i32
fn test_k(&self) -> bool
fn test_a_mode(&self) -> bool
fn is_mm_mode(&self) -> bool
fn is_vararg_prep(&self) -> bool
fn is_in_top(&self) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl InstructionExt for Instruction
impl InstructionExt for Instruction
Source§fn opcode(&self) -> OpCode
fn opcode(&self) -> OpCode
The 83-arm match looks expensive, but because OpCode is
#[repr(u8)] with explicit discriminants 0..=82 matching each match
arm’s integer key exactly, LLVM compiles this to a single bounds
check + identity cast — no jump table, no memory indirection. The
previous array-lookup form forced an extra OPCODE_TABLE byte load
per dispatch tick that LLVM could not see through.