Description
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#1030