Skip to content

ABI change in __extendhfsf2 and __truncsfhf2 on X86 #56854

Closed
@kparzysz-quic

Description

@kparzysz-quic

See also: https://discourse.llvm.org/t/how-to-build-compiler-rt-for-new-x86-half-float-abi/63366/15

Support for _Float16 was added in 15.0.0 (based on target capabilities). This had the unfortunate consequence that it changed the way calls to __truncsfhf2 and __extendhfsf2 are handled: in prior version of LLVM, or in the absence of support for _Float16, the half-precision floating point value was passed as uint16_t. In the x86 calling convention that type is passed in RDI, whereas _Float16 values are passed in XMM0. This introduces binary incompatibility between LLVM 15 and prior versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ABIApplication Binary Interfacebackend:X86

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions