teapotd opened Issue #1651:
In Microsoft x64 calling convention arguments larger than pointer width are passed by reference:
Any argument that doesn't fit in 8 bytes, or isn't 1, 2, 4, or 8 bytes, must be passed by reference. A single argument is never spread across multiple registers. [...] 16-byte arguments are passed by reference.
This means caller should allocate argument on stack and pass pointer to it instead of value in appropriate register/stack slot. Cranelift currently incorrently does the same thing as System V - splits values or pass them in vector registers. See also https://github.com/bytecodealliance/wasmtime/pull/1510#issuecomment-614770451.
[1] https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention
teapotd labeled Issue #1651:
In Microsoft x64 calling convention arguments larger than pointer width are passed by reference:
Any argument that doesn't fit in 8 bytes, or isn't 1, 2, 4, or 8 bytes, must be passed by reference. A single argument is never spread across multiple registers. [...] 16-byte arguments are passed by reference.
This means caller should allocate argument on stack and pass pointer to it instead of value in appropriate register/stack slot. Cranelift currently incorrently does the same thing as System V - splits values or pass them in vector registers. See also https://github.com/bytecodealliance/wasmtime/pull/1510#issuecomment-614770451.
[1] https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention
teapotd labeled Issue #1651:
In Microsoft x64 calling convention arguments larger than pointer width are passed by reference:
Any argument that doesn't fit in 8 bytes, or isn't 1, 2, 4, or 8 bytes, must be passed by reference. A single argument is never spread across multiple registers. [...] 16-byte arguments are passed by reference.
This means caller should allocate argument on stack and pass pointer to it instead of value in appropriate register/stack slot. Cranelift currently incorrently does the same thing as System V - splits values or pass them in vector registers. See also https://github.com/bytecodealliance/wasmtime/pull/1510#issuecomment-614770451.
[1] https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention
github-actions[bot] commented on Issue #1651:
Subscribe to Label Action
cc @bnjbvr
<details>
This issue or pull request has been labeled: "cranelift"Thus the following users have been cc'd because of the following labels:
- bnjbvr: cranelift
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
fitzgen closed Issue #1651:
In Microsoft x64 calling convention arguments larger than pointer width are passed by reference:
Any argument that doesn't fit in 8 bytes, or isn't 1, 2, 4, or 8 bytes, must be passed by reference. A single argument is never spread across multiple registers. [...] 16-byte arguments are passed by reference.
This means caller should allocate argument on stack and pass pointer to it instead of value in appropriate register/stack slot. Cranelift currently incorrently does the same thing as System V - splits values or pass them in vector registers. See also https://github.com/bytecodealliance/wasmtime/pull/1510#issuecomment-614770451.
[1] https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention
Last updated: Dec 23 2024 at 12:05 UTC