arm64 macOS variadic arguments ABI needs Cranelift support #1451
Labels
A-abi
Area: ABI handling
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
O-arm
Target: ARM processors (arm, thumb and AArch64 targets)
O-macos
Operating system: MacOS
S-blocked
Status: marked as blocked ❌ on something else such as an RFC or other implementation work.
On pretty much every target variadic functions almost the exact same ABI (on x86 you need to set
%al
to the upper bound of the amount of float args, so float args are currently forbidden by cg_clif) as non-variadic functions with the same arguments passed (after integer promotion, but rust denies vararg calls that need integer promotion anyway). This means that I can work around the lack of vararg support in Cranelift by changing the function signature of the imported function declaration to match the non-variadic counterpart. On arm64 macOS however variadic arguments are passed differently from non-variadic arguments: https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms#Update-code-that-passes-arguments-to-variadic-functions As such we can't support vararg functions on arm64 macOS until Cranelift gets native vararg support: bytecodealliance/wasmtime#1030The text was updated successfully, but these errors were encountered: