pub struct RegInstruction {
pub op: RegOpCode,
pub dst: u32,
pub src1: u32,
pub src2: u32,
pub imm: u32,
}Expand description
A single register bytecode instruction.
Fields§
§op: RegOpCode§dst: u32Destination register (when applicable).
src1: u32First source register.
src2: u32Second source register.
imm: u32Immediate operand (constant index, name index, jump target, arg count).
Implementations§
Source§impl RegInstruction
impl RegInstruction
pub fn new(op: RegOpCode, dst: u32, src1: u32, src2: u32, imm: u32) -> Self
pub fn simple(op: RegOpCode) -> Self
pub fn with_dst(op: RegOpCode, dst: u32) -> Self
pub fn with_dst_src(op: RegOpCode, dst: u32, src1: u32) -> Self
pub fn with_dst_srcs(op: RegOpCode, dst: u32, src1: u32, src2: u32) -> Self
pub fn with_dst_imm(op: RegOpCode, dst: u32, imm: u32) -> Self
pub fn with_src_imm(op: RegOpCode, src1: u32, imm: u32) -> Self
pub fn with_srcs_imm(op: RegOpCode, src1: u32, src2: u32, imm: u32) -> Self
Trait Implementations§
Source§impl Clone for RegInstruction
impl Clone for RegInstruction
Source§fn clone(&self) -> RegInstruction
fn clone(&self) -> RegInstruction
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 moreAuto Trait Implementations§
impl Freeze for RegInstruction
impl RefUnwindSafe for RegInstruction
impl Send for RegInstruction
impl Sync for RegInstruction
impl Unpin for RegInstruction
impl UnwindSafe for RegInstruction
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