From 2d5899a38ef352f2aa056cc77d51c4668bf2c0a4 Mon Sep 17 00:00:00 2001 From: Henry Gressmann Date: Mon, 18 Nov 2024 14:18:50 +0100 Subject: chore: basic simd instructions Signed-off-by: Henry Gressmann --- crates/types/src/instructions.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/types') diff --git a/crates/types/src/instructions.rs b/crates/types/src/instructions.rs index 1edfef7..fb3c1cc 100644 --- a/crates/types/src/instructions.rs +++ b/crates/types/src/instructions.rs @@ -52,7 +52,7 @@ pub enum ConstInstruction { /// This makes it easier to implement the label stack iteratively. /// /// See -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq)] #[cfg_attr(feature = "archive", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize))] // should be kept as small as possible (16 bytes max) #[rustfmt::skip] @@ -193,10 +193,10 @@ impl From for Instruction { } } -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq)] #[cfg_attr(feature = "archive", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize))] #[rustfmt::skip] -pub enum SimdInstruction { +pub enum SimdInstruction { V128Load(MemoryArg), V128Load8x8S(MemoryArg), V128Load8x8U(MemoryArg), V128Load16x4S(MemoryArg), V128Load16x4U(MemoryArg), @@ -204,7 +204,7 @@ pub enum SimdInstruction { V128Load8Splat(MemoryArg), V128Load16Splat(MemoryArg), V128Load32Splat(MemoryArg), V128Load64Splat(MemoryArg), V128Load8Lane(MemoryArg, u8), V128Load16Lane(MemoryArg, u8), V128Load32Lane(MemoryArg, u8), V128Load64Lane(MemoryArg, u8), - + V128Load32Zero(MemoryArg), V128Load64Zero(MemoryArg), V128Store(MemoryArg), V128Store8Lane(MemoryArg, u8), V128Store16Lane(MemoryArg, u8), V128Store32Lane(MemoryArg, u8), V128Store64Lane(MemoryArg, u8), -- cgit v1.3.1