Skip to content

missing host-fn support for multi-value #5943

@marxin

Description

@marxin

Right now, the multi-value support is not properly covered when it comes to host function that return multiple arguments, e.g. (i32, i32, i32) in Rust language.

More precisely, we're missing the full support for Singlepass, Cranelift and the LLVM+Windows targets. The #5936 PR included intensive set of tests that stress the functionality (LLVM+linux and LLVM+macos-arm work correctly).

For the Cranelift, we have to implement the ABI ourselves (using StructReturn type1), similarly to what we do for LLVM: https://github.com/wasmerio/wasmer/blob/main/lib/compiler-llvm/src/abi/x86_64_systemv.rs.

Footnotes

  1. https://docs.rs/alexcrichton-cranelift-codegen/latest/cranelift_codegen/ir/enum.ArgumentPurpose.html#variant.StructReturn

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions