-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
ABI adjustment code for wasm doesn't handle 128bit ints and floats #135532
Copy link
Copy link
Closed
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.
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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
According to https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md
__int128andlong long doublehave to be returned indirectly. Inrust/compiler/rustc_target/src/callconv/wasm.rs
Lines 21 to 30 in 2776bdf
.make_indirect()for i128 and f128. It currently works by accident as LLVM implicitly introduces a return area pointer when returning i128 and f128, but other backends and other code that needs to know the ABI may not be able to handle this.