From baafe7a55ddc846f1318d0252ab79c0d9324f617 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Mon, 7 Jul 2025 14:37:37 +0200 Subject: [PATCH 1/2] add missing cmp variants to compare_result --- crates/wasmi/src/engine/translator/comparator.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/wasmi/src/engine/translator/comparator.rs b/crates/wasmi/src/engine/translator/comparator.rs index db4540546a..e77851f5d2 100644 --- a/crates/wasmi/src/engine/translator/comparator.rs +++ b/crates/wasmi/src/engine/translator/comparator.rs @@ -68,6 +68,12 @@ impl CompareResult for Instruction { | I::I32LeU { result, .. } | I::I32LeUImm16Lhs { result, .. } | I::I32LeUImm16Rhs { result, .. } + | I::I64BitAnd { result, .. } + | I::I64BitAndImm16 { result, .. } + | I::I64BitOr { result, .. } + | I::I64BitOrImm16 { result, .. } + | I::I64BitXor { result, .. } + | I::I64BitXorImm16 { result, .. } | I::I64And { result, .. } | I::I64AndImm16 { result, .. } | I::I64Or { result, .. } @@ -100,10 +106,13 @@ impl CompareResult for Instruction { | I::F32Ne { result, .. } | I::F32Lt { result, .. } | I::F32Le { result, .. } + | I::F32NotLe { result, .. } | I::F64Eq { result, .. } | I::F64Ne { result, .. } | I::F64Lt { result, .. } - | I::F64Le { result, .. } => result, + | I::F64Le { result, .. } + | I::F64NotLt { result, .. } + | I::F64NotLe { result, .. } => result, _ => return None, }; Some(result) From efc4c7c819ff8bdb72b4ecc468a352677d98e5ed Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Mon, 7 Jul 2025 14:37:50 +0200 Subject: [PATCH 2/2] add forgotten variant --- crates/wasmi/src/engine/translator/comparator.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/wasmi/src/engine/translator/comparator.rs b/crates/wasmi/src/engine/translator/comparator.rs index e77851f5d2..39f18b9d10 100644 --- a/crates/wasmi/src/engine/translator/comparator.rs +++ b/crates/wasmi/src/engine/translator/comparator.rs @@ -106,6 +106,7 @@ impl CompareResult for Instruction { | I::F32Ne { result, .. } | I::F32Lt { result, .. } | I::F32Le { result, .. } + | I::F32NotLt { result, .. } | I::F32NotLe { result, .. } | I::F64Eq { result, .. } | I::F64Ne { result, .. }