Struct rabbitizer::Instruction

source ·
#[repr(C)]
pub struct Instruction { pub unique_id: InstrId, pub vram: u32, pub in_handwritten_function: bool, pub category: InstrCategory, /* private fields */ }

Fields§

§unique_id: InstrId§vram: u32§in_handwritten_function: bool§category: InstrCategory

Implementations§

source§

impl Instruction

source

pub fn new(word: u32, vram: u32, instr_cat: InstrCategory) -> Self

source

pub fn get_opcode(&self) -> u32

source

pub fn get_rs(&self) -> u32

source

pub fn get_rs_o32(&self) -> GprO32

source

pub fn get_rs_n32(&self) -> GprN32

source

pub fn get_rt(&self) -> u32

source

pub fn get_rt_o32(&self) -> GprO32

source

pub fn get_rt_n32(&self) -> GprN32

source

pub fn get_rd(&self) -> u32

source

pub fn get_rd_o32(&self) -> GprO32

source

pub fn get_rd_n32(&self) -> GprN32

source

pub fn get_sa(&self) -> u32

source

pub fn get_function(&self) -> u32

source

pub fn get_cop0d(&self) -> u32

source

pub fn get_cop0d_cop0(&self) -> Cop0

source

pub fn get_instr_index(&self) -> u32

source

pub fn get_immediate(&self) -> u16

source

pub fn get_code(&self) -> u32

source

pub fn get_code_upper(&self) -> u32

source

pub fn get_code_lower(&self) -> u32

source

pub fn get_copraw(&self) -> u32

source

pub fn get_fs(&self) -> u32

source

pub fn get_fs_o32(&self) -> Cop1O32

source

pub fn get_fs_n32(&self) -> Cop1N32

source

pub fn get_fs_n64(&self) -> Cop1N64

source

pub fn get_ft(&self) -> u32

source

pub fn get_ft_o32(&self) -> Cop1O32

source

pub fn get_ft_n32(&self) -> Cop1N32

source

pub fn get_ft_n64(&self) -> Cop1N64

source

pub fn get_fd(&self) -> u32

source

pub fn get_fd_o32(&self) -> Cop1O32

source

pub fn get_fd_n32(&self) -> Cop1N32

source

pub fn get_fd_n64(&self) -> Cop1N64

source

pub fn get_cop1cs(&self) -> u32

source

pub fn get_cop1cs_cop1control(&self) -> Cop1Control

source

pub fn get_cop2t(&self) -> u32

source

pub fn get_cop2t_cop2(&self) -> Cop2

source

pub fn raw(&self) -> u32

source

pub fn processed_immediate(&self) -> i32

source

pub fn instr_index_as_vram(&self) -> u32

source

pub fn branch_offset(&self) -> i32

source

pub fn branch_offset_generic(&self) -> i32

source

pub fn branch_vram_generic(&self) -> i32

source

pub fn destination_gpr(&self) -> Option<u32>

source

pub fn outputs_to_gpr_zero(&self) -> bool

source

pub fn opcode_name(&self) -> &'static str

source

pub fn blank_out(self)

source

pub fn is_implemented(&self) -> bool

source

pub fn is_likely_handwritten(&self) -> bool

source

pub fn is_nop(&self) -> bool

source

pub fn is_unconditional_branch(&self) -> bool

source

pub fn is_return(&self) -> bool

source

pub fn is_jumptable_jump(&self) -> bool

source

pub fn has_delay_slot(&self) -> bool

source

pub fn same_opcode(&self, other: &Instruction) -> bool

source

pub fn same_opcode_but_different_arguments(&self, other: &Instruction) -> bool

source

pub fn has_operand(&self, operand: OperandType) -> bool

source

pub fn has_operand_alias(&self, operand: OperandType) -> bool

source

pub fn is_valid(&self) -> bool

source

pub fn get_operand_type(&self, index: usize) -> OperandType

source

pub fn get_operands_slice(&self) -> &[OperandType]

source

pub fn instr_suffix(&self) -> InstrSuffix

source

pub fn is_branch(&self) -> bool

source

pub fn is_branch_likely(&self) -> bool

source

pub fn is_jump(&self) -> bool

source

pub fn is_jump_with_address(&self) -> bool

source

pub fn is_trap(&self) -> bool

source

pub fn is_float(&self) -> bool

source

pub fn is_double(&self) -> bool

source

pub fn is_unsigned(&self) -> bool

source

pub fn modifies_rs(&self) -> bool

source

pub fn modifies_rt(&self) -> bool

source

pub fn modifies_rd(&self) -> bool

source

pub fn reads_rs(&self) -> bool

source

pub fn reads_rt(&self) -> bool

source

pub fn reads_rd(&self) -> bool

source

pub fn reads_hi(&self) -> bool

source

pub fn reads_lo(&self) -> bool

source

pub fn modifies_hi(&self) -> bool

source

pub fn modifies_lo(&self) -> bool

source

pub fn modifies_fs(&self) -> bool

source

pub fn modifies_ft(&self) -> bool

source

pub fn modifies_fd(&self) -> bool

source

pub fn reads_fs(&self) -> bool

source

pub fn reads_ft(&self) -> bool

source

pub fn reads_fd(&self) -> bool

source

pub fn not_emited_by_compilers(&self) -> bool

source

pub fn not_emitted_by_compilers(&self) -> bool

source

pub fn can_be_hi(&self) -> bool

source

pub fn can_be_lo(&self) -> bool

source

pub fn does_dereference(&self) -> bool

source

pub fn does_load(&self) -> bool

source

pub fn does_store(&self) -> bool

source

pub fn maybe_is_move(&self) -> bool

source

pub fn is_pseudo(&self) -> bool

source

pub fn access_type(&self) -> AccessType

source

pub fn does_unsigned_memory_access(&self) -> bool

source

pub fn disassemble( &self, imm_override: Option<&str>, extra_l_just: i32 ) -> String

Trait Implementations§

source§

impl Clone for Instruction

source§

fn clone(&self) -> Instruction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Instruction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for Instruction

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.