#[non_exhaustive]pub enum Instr<Extension = ReservedOp>where
Extension: InstructionSet,{
Show 13 variants
ControlFlow(ControlFlowOp),
Put(PutOp),
Move(MoveOp),
Cmp(CmpOp),
Arithmetic(ArithmeticOp),
Bitwise(BitwiseOp),
Bytes(BytesOp),
Digest(DigestOp),
Secp256k1(Secp256k1Op),
Curve25519(Curve25519Op),
ExtensionCodes(Extension),
ReservedInstruction(ReservedOp),
Nop,
}
Expand description
Full set of instructions
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ControlFlow(ControlFlowOp)
Control-flow instructions. See ControlFlowOp
for the details.
Put(PutOp)
Instructions setting register values. See PutOp
for the details.
Move(MoveOp)
Instructions moving and swapping register values. See PutOp
for the details.
Cmp(CmpOp)
Instructions comparing register values. See CmpOp
for the details.
Arithmetic(ArithmeticOp)
Arithmetic instructions. See ArithmeticOp
for the details.
Bitwise(BitwiseOp)
Bit operations & boolean algebra instructions. See BitwiseOp
for the details.
Bytes(BytesOp)
Operations on byte strings. See BytesOp
for the details.
Digest(DigestOp)
Cryptographic hashing functions. See DigestOp
for the details.
Secp256k1(Secp256k1Op)
Operations on Secp256k1 elliptic curve. See Secp256k1Op
for the details.
Curve25519(Curve25519Op)
Operations on Curve25519 elliptic curve. See Curve25519Op
for the details.
ExtensionCodes(Extension)
Extension operations which can be provided by a host environment provided via generic parameter
ReservedInstruction(ReservedOp)
Reserved instruction for fututre use in core ALU
ISA.
Currently equal to ControlFlowOp::Fail
.
Nop
No-operation instruction.
Trait Implementations§
source§impl<Extension> Bytecode for Instr<Extension>where
Extension: InstructionSet,
impl<Extension> Bytecode for Instr<Extension>where Extension: InstructionSet,
source§fn byte_count(&self) -> u16
fn byte_count(&self) -> u16
source§fn instr_range() -> RangeInclusive<u8>
fn instr_range() -> RangeInclusive<u8>
source§fn instr_byte(&self) -> u8
fn instr_byte(&self) -> u8
source§fn call_site(&self) -> Option<LibSite>
fn call_site(&self) -> Option<LibSite>
source§fn encode_args<W>(&self, writer: &mut W) -> Result<(), BytecodeError>where
W: Write,
fn encode_args<W>(&self, writer: &mut W) -> Result<(), BytecodeError>where W: Write,
source§impl<Extension> Display for Instr<Extension>where
Extension: InstructionSet,
impl<Extension> Display for Instr<Extension>where Extension: InstructionSet,
source§impl<Extension> InstructionSet for Instr<Extension>where
Extension: InstructionSet,
impl<Extension> InstructionSet for Instr<Extension>where Extension: InstructionSet,
§type Context<'ctx> = <Extension as InstructionSet>::Context<'ctx>
type Context<'ctx> = <Extension as InstructionSet>::Context<'ctx>
source§fn isa_ids() -> BTreeSet<&'static str>
fn isa_ids() -> BTreeSet<&'static str>
source§fn exec(
&self,
regs: &mut CoreRegs,
site: LibSite,
ctx: &Self::Context<'_>
) -> ExecStep
fn exec( &self, regs: &mut CoreRegs, site: LibSite, ctx: &Self::Context<'_> ) -> ExecStep
source§fn isa_string() -> String
fn isa_string() -> String
source§fn isa_id() -> Box<[u8]>
fn isa_id() -> Box<[u8]>
source§fn is_supported(id: &str) -> bool
fn is_supported(id: &str) -> bool
source§fn complexity(&self) -> u64
fn complexity(&self) -> u64
source§impl<Extension> PartialEq for Instr<Extension>where
Extension: InstructionSet + PartialEq,
impl<Extension> PartialEq for Instr<Extension>where Extension: InstructionSet + PartialEq,
impl<Extension> Eq for Instr<Extension>where Extension: InstructionSet + Eq,
impl<Extension> StructuralEq for Instr<Extension>where Extension: InstructionSet,
impl<Extension> StructuralPartialEq for Instr<Extension>where Extension: InstructionSet,
Auto Trait Implementations§
impl<Extension> RefUnwindSafe for Instr<Extension>where Extension: RefUnwindSafe,
impl<Extension> Send for Instr<Extension>where Extension: Send,
impl<Extension> Sync for Instr<Extension>where Extension: Sync,
impl<Extension> Unpin for Instr<Extension>where Extension: Unpin,
impl<Extension> UnwindSafe for Instr<Extension>where Extension: UnwindSafe,
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.