From 930cac446a7c3a797abe2daf16c8da5cae77d6f3 Mon Sep 17 00:00:00 2001 From: Pavel Shliak Date: Sat, 6 Sep 2025 02:24:18 +0400 Subject: [PATCH] LibWasm: Fix Negate::name() to return "neg" Negate was incorrectly returning "== 0", a copy/paste from EqualsZero. This patch corrects it to return "neg", matching the operator's actual semantics and WebAssembly mnemonics (f32.neg, f64.neg). (cherry picked from commit 5f4ad17f89a5c58768251d079321412e97823bfe) --- Userland/Libraries/LibWasm/AbstractMachine/Operators.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWasm/AbstractMachine/Operators.h b/Userland/Libraries/LibWasm/AbstractMachine/Operators.h index 0e9435a4d13..e05e58abe34 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/Operators.h +++ b/Userland/Libraries/LibWasm/AbstractMachine/Operators.h @@ -547,7 +547,7 @@ struct Negate { return -lhs; } - static StringView name() { return "== 0"sv; } + static StringView name() { return "neg"sv; } }; struct Ceil {