wasm32: Typecast Pointer to QWord results in validation error
Summary
Attempting to typecast Pointer to QWord results in validation error.
System Information
- Host: Windows
- Guest: wasmer
- Processor architecture: x86_64
- Compiler version: 3.3.1-17249-g29ad3f9ae5
- Device: Computer
Steps to reproduce
- Build the following code with ppcrosswasm32, then runs the binary in either wasmer, wasmtime, or https://webassembly.sh/
- The following error message will shows up:
wasm shell: parse error (CompileError: WebAssembly.compile(): Compiling function #27:"main" failed: local.set[0] expected type i64, found i32.load of type i32 @+3306)
Example Project
{$mode objfpc}
{$H+}
var
A: QWord;
B: Pointer;
begin
A := QWord(B);
end.