Skip to content

WebAssembly calling convention impl incorrectly uses make_indirect_byval() #130442

@bjorn3

Description

@bjorn3

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

No one assigned

    Labels

    A-ABIArea: Concerning the application binary interface (ABI)C-bugCategory: This is a bug.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions