From 6ce57a16257939c96c97fd1af1d44bb98ea04c77 Mon Sep 17 00:00:00 2001 From: Nikolay Nikolov Date: Sun, 2 Feb 2025 16:46:44 +0200 Subject: [PATCH] * WebAssembly: also handle dup=true in thlcgwasm.prepare_stack_for_ref for absolute address refs --- compiler/wasm32/hlcgcpu.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/wasm32/hlcgcpu.pas b/compiler/wasm32/hlcgcpu.pas index 47aed338a1..a70c756526 100644 --- a/compiler/wasm32/hlcgcpu.pas +++ b/compiler/wasm32/hlcgcpu.pas @@ -1322,6 +1322,11 @@ implementation { no symbol, no index, just fixed address, e.g. var a: longint absolute 5; } list.Concat(taicpu.op_const(a_i32_const,0)); incstack(list,1); + if dup then + begin + list.Concat(taicpu.op_const(a_i32_const,0)); + incstack(list,1); + end; result:=1; end; end;