Skip to content

[Wasm RyuJIT] Local field/var stores are broken #124903

@kg

Description

@kg
    [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
    static void manipulateLocal (double arg) {
        double d = 17;
        d += arg;
    }
[CompileError: WebAssembly.compile(): Compiling function #3 failed: not enough arguments on the stack for f64.store (need 2, got 1) @+660]
#3 wasm_test_Program__manipulateLocal ( i32, f64, i32 ) -> none (49 byte(s))

0630 2000       get_local i32 arg0
0632 4114       i32_const 0x00000014 20
0634 6B         i32_sub
0635 2100       set_local i32 arg0
0637 2000       get_local i32 arg0
0639 2001       get_local f64 arg1
0641 39000C     f64_store +12
0644 2000       get_local i32 arg0
0646 2002       get_local i32 arg2
0648 360008     i32_store +8
0651 440000000000 ...
003140          f64_const 0x4031000000000000 17
0660 390000     f64_store +0
0663 2000       get_local i32 arg0
0665 2B0000     f64_load +0
0668 2000       get_local i32 arg0
0670 2B000C     f64_load +12
0673 A0         f64_add
0674 390000     f64_store +0
0677 0B         end

Metadata

Metadata

Assignees

Labels

arch-wasmWebAssembly architecturearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions