pub struct Instruction { /* private fields */ }
Expand description
Instruction is 64 bit
| 8bit | 8bit | 8bit | 8bit | 32bit |
| Opcode |
Implementations§
Source§impl Instruction
impl Instruction
pub fn new( op: Opcode, type0: Option<ValueType>, type1: Option<ValueType>, type2: Option<ValueType>, imm: Option<OpIndex>, ) -> Instruction
pub fn from_u64(v: u64) -> Instruction
pub fn set_imm(&mut self, imm: OpIndex)
Sourcepub fn set_imm824(&mut self, imm0: OpIndex, imm1: OpIndex)
pub fn set_imm824(&mut self, imm0: OpIndex, imm1: OpIndex)
set_imm824 sets an 8bit imm and a 24bit imm at the lower 4 bytes
Sourcepub fn set_t2_with_index(&mut self, index: i8)
pub fn set_t2_with_index(&mut self, index: i8)
set_t2_with_index tries to set an OpIndex to the space of t2 returns error if it’s out of range used by STORE_INDEX_IMM, STORE_STRUCT_FIELD
pub fn get_u64(&self) -> u64
pub fn op(&self) -> Opcode
pub fn t0(&self) -> ValueType
pub fn t1(&self) -> ValueType
pub fn t2(&self) -> ValueType
pub fn t2_as_index(&self) -> OpIndex
pub fn imm(&self) -> OpIndex
pub fn imm824(&self) -> (OpIndex, OpIndex)
pub fn code2index(op: Opcode) -> OpIndex
pub fn index2code(i: OpIndex) -> Opcode
pub fn in_8bit_range(i: OpIndex) -> bool
pub fn in_24bit_range(i: OpIndex) -> bool
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
impl Copy for Instruction
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