Struct Instruction

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

Fields§

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

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 flags_get_r5900_disasm_as_data(&self) -> TrinaryValue

Source

pub fn flags_set_r5900_disasm_as_data(&mut self, value: TrinaryValue)

Source

pub fn flags_get_r5900_use_dollar(&self) -> TrinaryValue

Source

pub fn flags_set_r5900_use_dollar(&mut self, value: TrinaryValue)

Source

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

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) -> u32

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

👎Deprecated since 1.8.4: please use is_valid instead
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_function_call(&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: c_int, ) -> 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 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

type Error = Infallible

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

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

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.