This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] [builtins] Don't use assembly floatundi*f on x86_64 mingw
ClosedPublic

Authored by mstorsjo on Apr 6 2023, 1:12 AM.

Details

Summary

The x86 assembly is entirely skipped for MSVC build configurations,
since the assembly uses GAS syntax (which MSVC proper can't
assemble, but clang-cl can). But for mingw configurations, the
assembly is used.

On x86_64 Windows, the general calling convention is entirely different
than on other platforms (passing arguments in different registers),
so we can't use this assembly for mingw targets (unless adapted to
handle that calling convention). Thus skip these few assembly routines
for Windows targets. (For i386, we can keep using the assembly
functions.)

This fixes the builtins tests that test these routines. They aren't
used in practice though, as LLVM expands code inline for doing such
conversions anyway.

Diff Detail

Event Timeline

mstorsjo created this revision.Apr 6 2023, 1:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2023, 1:12 AM
mstorsjo requested review of this revision.Apr 6 2023, 1:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2023, 1:12 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
phosek accepted this revision.Apr 8 2023, 2:31 PM

LGTM

This revision is now accepted and ready to land.Apr 8 2023, 2:31 PM