diff options
| author | Techatrix <19954306+Techatrix@users.noreply.github.com> | 2023-01-31 17:01:56 +0100 |
|---|---|---|
| committer | Techatrix <19954306+Techatrix@users.noreply.github.com> | 2023-01-31 17:01:56 +0100 |
| commit | 47ff57ed7ddbf4c4a0f93208fc96851c9033b8b7 (patch) | |
| tree | 9b9b34a7deb95bccf2f9a886e29d21642cf1160c /src | |
| parent | 1f64432196e51785fe1dba442a0878c1b10f8b06 (diff) | |
| download | zig-47ff57ed7ddbf4c4a0f93208fc96851c9033b8b7.tar.gz zig-47ff57ed7ddbf4c4a0f93208fc96851c9033b8b7.zip | |
wasm: apply request change
Diffstat (limited to 'src')
| -rw-r--r-- | src/arch/wasm/CodeGen.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig index d0ff27a3e2..c0d0c11b56 100644 --- a/src/arch/wasm/CodeGen.zig +++ b/src/arch/wasm/CodeGen.zig @@ -3880,8 +3880,11 @@ fn isNull(func: *CodeGen, operand: WValue, optional_ty: Type, opcode: wasm.Opcod try func.addMemArg(.i32_load8_u, .{ .offset = operand.offset(), .alignment = 1 }); } } else if (payload_ty.isSlice()) { - // move the ptr on top of the stack - _ = try func.load(operand, Type.usize, 0); + switch (func.arch()) { + .wasm32 => try func.addMemArg(.i32_load, .{ .offset = operand.offset(), .alignment = 4 }), + .wasm64 => try func.addMemArg(.i64_load, .{ .offset = operand.offset(), .alignment = 8 }), + else => unreachable, + } } // Compare the null value with '0' |
