summaryrefslogtreecommitdiff
path: root/crates/types
diff options
context:
space:
mode:
Diffstat (limited to 'crates/types')
-rw-r--r--crates/types/src/instructions.rs19
1 files changed, 8 insertions, 11 deletions
diff --git a/crates/types/src/instructions.rs b/crates/types/src/instructions.rs
index 5eb5491..4e14d75 100644
--- a/crates/types/src/instructions.rs
+++ b/crates/types/src/instructions.rs
@@ -186,6 +186,7 @@ pub enum Instruction {
// The 32/64 suffix describes the operand width. Future compare-style ops may still yield i32 results.
BinOpLocalLocal32(BinOp, LocalAddr, LocalAddr), BinOpLocalLocal64(BinOp, LocalAddr, LocalAddr),
BinOpLocalLocal128(BinOp128, LocalAddr, LocalAddr),
+ CmpLocalLocal32(CmpOp, LocalAddr, LocalAddr), CmpLocalLocal64(CmpOp, LocalAddr, LocalAddr),
BinOpLocalLocalSet32(BinOp, LocalAddr, LocalAddr, LocalAddr),
BinOpLocalLocalSet64(BinOp, LocalAddr, LocalAddr, LocalAddr),
BinOpLocalLocalSet128(BinOp128, LocalAddr, LocalAddr, LocalAddr),
@@ -255,6 +256,10 @@ pub enum Instruction {
JumpIfLocalNonZero64 { target_ip: u32, local: LocalAddr },
JumpCmpStackConst32 { target_ip: u32, imm: i32, op: CmpOp },
JumpCmpStackConst64 { target_ip: u32, imm: i64, op: CmpOp },
+ JumpCmpStackLocal32 { target_ip: u32, local: LocalAddr, op: CmpOp },
+ JumpCmpStackLocal64 { target_ip: u32, local: LocalAddr, op: CmpOp },
+ IncLocalJump32 { target_ip: u32, local: LocalAddr, delta: i32, on_zero: bool },
+ IncLocalJumpCmpLocal32 { target_ip: u32, local: LocalAddr, delta: i32, right: LocalAddr, op: CmpOp },
JumpCmpLocalConst32 { target_ip: u32, local: LocalAddr, imm: i32, op: CmpOp },
JumpCmpLocalConst64 { target_ip: u32, local: LocalAddr, imm: i32, op: CmpOp },
JumpCmpLocalLocal32 { target_ip: u32, left: LocalAddr, right: LocalAddr, op: CmpOp },
@@ -477,9 +482,11 @@ pub enum Instruction {
F64x2RelaxedMin, F64x2RelaxedMax,
I16x8RelaxedQ15mulrS,
I16x8RelaxedDotI8x16I7x16S,
- I32x4RelaxedDotI8x16I7x16AddS
+ I32x4RelaxedDotI8x16I7x16AddS,
}
+const _: () = assert!(core::mem::size_of::<Instruction>() <= 16);
+
impl Instruction {
#[inline]
pub const fn memory_addr(&self) -> Option<MemAddr> {
@@ -564,13 +571,3 @@ impl Instruction {
}
}
}
-
-#[cfg(test)]
-mod tests {
- use super::Instruction;
-
- #[test]
- fn instruction_layout_size_is_stable() {
- assert_eq!(core::mem::size_of::<Instruction>(), 16);
- }
-}