pub enum CpuInstruction {
ConstFloat(f64),
ConstInt(i64),
Pop,
Dup,
Swap,
Return,
Halt,
}Expand description
CPU/stack instructions (device code 0x00, FLAIR-aligned).
Variants§
ConstFloat(f64)
Push a 64-bit float constant. Opcode 0x0300.
ConstInt(i64)
Push a 64-bit signed integer constant. Opcode 0x0200.
Pop
Pop and discard the top stack value. Opcode 0x0500.
Dup
Duplicate the top stack value. Opcode 0x0400.
Swap
Swap the top two stack values. Opcode 0x0600.
Return
Return from program. Opcode 0x6400.
Halt
Halt execution. Opcode 0xFF00.
Trait Implementations§
Source§impl Clone for CpuInstruction
impl Clone for CpuInstruction
Source§fn clone(&self) -> CpuInstruction
fn clone(&self) -> CpuInstruction
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 CpuInstruction
impl Debug for CpuInstruction
Source§impl PartialEq for CpuInstruction
impl PartialEq for CpuInstruction
impl Copy for CpuInstruction
impl StructuralPartialEq for CpuInstruction
Auto Trait Implementations§
impl Freeze for CpuInstruction
impl RefUnwindSafe for CpuInstruction
impl Send for CpuInstruction
impl Sync for CpuInstruction
impl Unpin for CpuInstruction
impl UnwindSafe for CpuInstruction
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