-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Copy link
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)C-bugCategory: This is a bug.Category: This is a bug.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
It should use make_indirect()
instead. It seems like LLVM ignores sarg
on WebAssembly, so it happens to work out fine in the end with the LLVM backend at least, but it is still incorrect per https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md.
For those unaware the difference between the two is that make_indirect()
will pass a pointer to the argument somewhere, while make_indirect_byval()
is supposed to store the argument at a fixed location on the stack.
Metadata
Metadata
Assignees
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)C-bugCategory: This is a bug.Category: This is a bug.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.