Skip to content

arm64 macOS variadic arguments ABI needs Cranelift support #1451

Closed
@bjorn3

Description

@bjorn3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-abiArea: ABI handlingC-enhancementCategory: An issue proposing an enhancement or a PR with one.O-armTarget: ARM processors (arm, thumb and AArch64 targets)O-macosOperating system: MacOSS-blockedStatus: marked as blocked ❌ on something else such as an RFC or other implementation work.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions