From 3b93b98a3e886ed5b916f2812815deed935e40d2 Mon Sep 17 00:00:00 2001 From: Katelyn Gadd Date: Wed, 7 Jan 2026 16:12:39 -0800 Subject: [PATCH 1/2] Disable creating addressing modes on Wasm --- src/coreclr/jit/codegencommon.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/coreclr/jit/codegencommon.cpp b/src/coreclr/jit/codegencommon.cpp index 50622129a21132..a0071abe2d4116 100644 --- a/src/coreclr/jit/codegencommon.cpp +++ b/src/coreclr/jit/codegencommon.cpp @@ -1133,6 +1133,11 @@ bool CodeGen::genCreateAddrMode(GenTree* addr, unsigned* mulPtr, ssize_t* cnsPtr) { +// WASM-TODO: Prove whether a given addressing mode obeys the Wasm rules. +// See https://github.com/dotnet/runtime/pull/122897#issuecomment-3721304477 for more details. +#if defined(TARGET_WASM) + return false; +#endif // TARGET_WASM /* The following indirections are valid address modes on x86/x64: From d317c2b550657feab74b8cbe79e47b6dc97ad2f8 Mon Sep 17 00:00:00 2001 From: Katelyn Gadd Date: Wed, 7 Jan 2026 17:19:58 -0800 Subject: [PATCH 2/2] Update src/coreclr/jit/codegencommon.cpp Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> --- src/coreclr/jit/codegencommon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/codegencommon.cpp b/src/coreclr/jit/codegencommon.cpp index a0071abe2d4116..9266781aa0fda3 100644 --- a/src/coreclr/jit/codegencommon.cpp +++ b/src/coreclr/jit/codegencommon.cpp @@ -1133,7 +1133,7 @@ bool CodeGen::genCreateAddrMode(GenTree* addr, unsigned* mulPtr, ssize_t* cnsPtr) { -// WASM-TODO: Prove whether a given addressing mode obeys the Wasm rules. +// TODO-WASM: Prove whether a given addressing mode obeys the Wasm rules. // See https://github.com/dotnet/runtime/pull/122897#issuecomment-3721304477 for more details. #if defined(TARGET_WASM) return false;