This is an archive of the discontinued LLVM Phabricator instance.

[builtins] Fix __floattitf and __floatuntitf on x86
ClosedPublic

Authored by arichardson on Aug 12 2022, 9:26 AM.

Details

Summary

These conversion functions were using LDBL_MANT_DIG (which is the 80-bit
extended float on x86) instead of the appropriate macro for the 128-bit
floating point type expected by the *tf* softfloat library calls.
This was discovered while testing D98261 (which allows building the *tf*
functions on x86).

This also changes the constants used in the two tests to use 128-bit
floating-point literals instead of long double ones to ensure that the
comparison succeeds on platforms with smaller long double (e.g. x86_64)

Diff Detail

Event Timeline

arichardson created this revision.Aug 12 2022, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 9:26 AM
Herald added subscribers: Enna1, pengfei. · View Herald Transcript
arichardson requested review of this revision.Aug 12 2022, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2022, 9:26 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
scanon accepted this revision.Oct 4 2022, 6:20 PM
This revision is now accepted and ready to land.Oct 4 2022, 6:20 PM

Rebase prior to commiting

This revision was landed with ongoing or failed builds.Jun 27 2023, 9:22 AM
This revision was automatically updated to reflect the committed changes.