diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2024-05-30 01:16:56 +0200 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2024-05-30 01:16:56 +0200 |
| commit | 7c3fd68f703d944b05dcea08f3a46c59b41503f4 (patch) | |
| tree | 4588645c28ea9775ae39f4875b019f72269dbb6f /crates/types/src | |
| parent | ffb1e095fc1d6a2d54cc7637797c625dee6ebe6a (diff) | |
chore: cleanup
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/types/src')
| -rw-r--r-- | crates/types/src/instructions.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/crates/types/src/instructions.rs b/crates/types/src/instructions.rs index bb1f96c..f9f861e 100644 --- a/crates/types/src/instructions.rs +++ b/crates/types/src/instructions.rs @@ -85,18 +85,16 @@ pub enum ConstInstruction { #[cfg_attr(feature = "archive", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize), archive(check_bytes))] // should be kept as small as possible (16 bytes max) #[rustfmt::skip] -#[non_exhaustive] pub enum Instruction { // > Custom Instructions BrLabel(LabelAddr), // LocalGet + I32Const + I32Add - // One of the most common patterns in the Rust compiler output I32LocalGetConstAdd(LocalAddr, i32), - // LocalGet + I32Const + I32Store => I32LocalGetConstStore + I32Const - // Also common, helps us skip the stack entirely. - // Has to be followed by an I32Const instruction - I32StoreLocal { local: LocalAddr, const_i32: i32, offset: u32, mem_addr: u8 }, - // I64Xor + I64Const + I64RotL + // LocalGet + I32Const + I32Store + I32ConstStoreLocal { local: LocalAddr, const_i32: i32, offset: u32, mem_addr: u8 }, + // LocalGet + LocalGet + I32Store + I32StoreLocal { local_a: LocalAddr, local_b: LocalAddr, offset: u32, mem_addr: u8 }, + // I64Xor + I64Const + I64RotL // Commonly used by a few crypto libraries I64XorConstRotl(i64), // LocalTee + LocalGet |
