Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm32-freestanding-musl sometimes triggers "TODO implement C ABI for this architecture" #2766

Closed
fengb opened this issue Jun 27, 2019 · 4 comments
Labels
arch-wasm 32-bit and 64-bit WebAssembly enhancement Solving this issue will likely involve adding new logic or components to the codebase. stage1 The process of building from source via WebAssembly and the C backend.
Milestone

Comments

@fengb
Copy link
Contributor

fengb commented Jun 27, 2019

Here's a repo with this behavior: https://github.com/fengb/fundude/tree/zig

Looking at the surrounding function want_first_arg_sret: I think we need a special check for wasm. Simply doing return false works for my code, but I'm not sure that's correct.

@andrewrk
Copy link
Member

This is related to #1481

@andrewrk andrewrk added this to the 0.5.0 milestone Jun 27, 2019
@andrewrk andrewrk added arch-wasm 32-bit and 64-bit WebAssembly enhancement Solving this issue will likely involve adding new logic or components to the codebase. stage1 The process of building from source via WebAssembly and the C backend. labels Jun 27, 2019
@fengb
Copy link
Contributor Author

fengb commented Jun 27, 2019

Ah I see. I’m passing structs everywhere but the wasm bytecode only handles number arguments.

@fengb
Copy link
Contributor Author

fengb commented Jun 27, 2019

Seems like Rust also has outstanding questions regards to the wasm ABI and they are leaning towards "do whatever Clang/LLVM does": rustwasm/team#29 (comment)

@andrewrk andrewrk modified the milestones: 0.5.0, 0.6.0 Jun 27, 2019
@andrewrk andrewrk modified the milestones: 0.6.0, 0.7.0 Feb 10, 2020
@andrewrk andrewrk modified the milestones: 0.7.0, 0.8.0 Oct 17, 2020
@andrewrk andrewrk modified the milestones: 0.8.0, 0.9.0 Nov 6, 2020
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 May 19, 2021
@andrewrk andrewrk modified the milestones: 0.11.0, 0.9.1 Nov 27, 2021
@andrewrk andrewrk modified the milestones: 0.9.1, 0.10.0 Feb 3, 2022
@andrewrk andrewrk modified the milestones: 0.10.0, 0.11.0 Apr 16, 2022
@Vexu
Copy link
Member

Vexu commented Dec 7, 2022

Wasm C ABI is fully implemented in self-hosted.

@Vexu Vexu closed this as completed Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm 32-bit and 64-bit WebAssembly enhancement Solving this issue will likely involve adding new logic or components to the codebase. stage1 The process of building from source via WebAssembly and the C backend.
Projects
None yet
Development

No branches or pull requests

3 participants