pub struct DecodedInsn {
pub len: u8,
pub bytes: Vec<u8>,
pub text: String,
pub control_flow: ControlFlow,
pub branch_operand_index: Option<usize>,
pub named_register: Option<u8>,
pub data_refs: Vec<DataRef>,
}Expand description
A CPU-neutral decoded instruction: everything the disassembler needs to render, trace, and cross-reference an instruction without knowing the ISA.
Fields§
§len: u8Byte length of the instruction.
bytes: Vec<u8>The instruction bytes (length len).
text: StringCanonical text (mnemonic + operands), before label substitution.
control_flow: ControlFlowControl flow after this instruction.
branch_operand_index: Option<usize>Which operand (0-based) holds the branch/jump target, for label
substitution during rendering. None if the instruction has no target.
named_register: Option<u8>A register-file address to surface by name in listings (the 8051 SFR
naming hook). None on CPUs without one.
data_refs: Vec<DataRef>Static data references, space-classified by the driver.
Implementations§
Source§impl DecodedInsn
impl DecodedInsn
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn bytes(&self) -> &[u8] ⓘ
pub fn control_flow(&self) -> ControlFlow
pub fn as_string(&self) -> &str
Sourcepub fn direct_addr(&self) -> Option<u8>
pub fn direct_addr(&self) -> Option<u8>
The register-file address to name, if any (see named_register).
Trait Implementations§
Source§impl Clone for DecodedInsn
impl Clone for DecodedInsn
Auto Trait Implementations§
impl Forget for DecodedInsn
impl Freeze for DecodedInsn
impl Move for DecodedInsn
impl RefUnwindSafe for DecodedInsn
impl Send for DecodedInsn
impl Sync for DecodedInsn
impl Unpin for DecodedInsn
impl UnsafeUnpin for DecodedInsn
impl UnwindSafe for DecodedInsn
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more