pub struct Instruction(/* private fields */);Implementations§
Source§impl Instruction
impl Instruction
pub fn new(raw: u32) -> Self
pub fn raw(&self) -> u32
Sourcepub fn funct(&self) -> u8
pub fn funct(&self) -> u8
For SPECIAL (00), opcode instructions (R-Type), this returns the function code, or secondary opcode.
Sourcepub fn rs(&self) -> usize
pub fn rs(&self) -> usize
The index of the rs (source) register.Like forrtandrd`, it is not always a source register.
Sourcepub fn jump_target(&self) -> u32
pub fn jump_target(&self) -> u32
The value of the 26-bit jump target field, zero-extended to 32 bits. You must shift this value left by 2 bits to get the actual address.
Sourcepub fn cop_execute(&self) -> bool
pub fn cop_execute(&self) -> bool
This bit is set if the instruction must be executed by a coprocessor.
Sourcepub fn cop_funct(&self) -> u8
pub fn cop_funct(&self) -> u8
For non cop-execute instructions, this is the secondary opcode, to distinguish between mfc, mtc, etc…
Sourcepub fn cop_instruction(&self) -> u32
pub fn cop_instruction(&self) -> u32
The raw coprocessor instruction code, which is the lower 25 bits. The meaning is coprocessor-specific.
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
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