Enum strontium::instruction::Instruction
source · pub enum Instruction {
Show 14 variants
HALT,
SET,
UNSET,
ALLOCATE,
DEALLOCATE,
AND,
OR,
XOR,
NOT,
LSHIFT,
RSHIFT,
JUMP,
JUMPIF,
ILLEGAL,
}
Variants
HALT
Stop executing bytecode
SET
Set the bit(s) at the given address(es) to 1
UNSET
Set the bit(s) at the given address(es) to 0
ALLOCATE
Grow the virtual memory by (n) bits
DEALLOCATE
Shrink the virtual memory by (n) bits
AND
Perform a bitwise AND operation on two bits or two ranges
OR
Perform a bitwise OR operation on two bits or two ranges
XOR
Perform a bitwise exclusive OR operation on two bits or two ranges
NOT
Perform a bitwise negation on two bits or two ranges
LSHIFT
Perform an arithmetic left shift on two given ranges
RSHIFT
Perform an arithmetic right shift on two given ranges
JUMP
Set the instruction pointer to the given value
JUMPIF
Set the instruction pointer to a value if the bit at a given address is set
ILLEGAL
Invalid instruction
Trait Implementations
sourceimpl Debug for Instruction
impl Debug for Instruction
sourceimpl From<u8> for Instruction
impl From<u8> for Instruction
sourceimpl Into<u8> for Instruction
impl Into<u8> for Instruction
sourceimpl PartialEq<Instruction> for Instruction
impl PartialEq<Instruction> for Instruction
sourcefn eq(&self, other: &Instruction) -> bool
fn eq(&self, other: &Instruction) -> bool
impl StructuralPartialEq for Instruction
Auto Trait Implementations
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more