This is an archive of the discontinued LLVM Phabricator instance.

Compile and test i128 math builtins for Win64
ClosedPublic

Authored by rnk on Oct 30 2018, 6:47 PM.

Details

Summary

Windows has always been LLP64, not LP64, so the macros were incorrect.
Check for _WIN64, since AArch64 sets that too.

The tests have to be fixed up in two main ways:

  1. Use 'ULL' suffixes to avoid sign extension when passing hex literals with the sign bit set to signed 128 arguments. Clang -fms-compatibility makes such hex literals signed, not unsigned.
  2. Disable various tests for 80-bit long double interoperation with i128 values.

Diff Detail

Event Timeline

rnk created this revision.Oct 30 2018, 6:47 PM
rnk updated this revision to Diff 171858.Oct 30 2018, 6:50 PM
  • remove unintended parts of the diff
This revision is now accepted and ready to land.Oct 31 2018, 1:41 AM
rnk added inline comments.Oct 31 2018, 3:00 PM
compiler-rt/lib/builtins/int_types.h
68–74 ↗(On Diff #171858)

I went to test this with a variety of compilers before submitting, but basically, this part here is problematic in MSVC builds. In those builds, the builtins are built with the host compiler (cl.exe), but the tests are built with clang. So, the tests think i128 math is supported, but they all produce undefined symbol errors because the helper functions have been compiled out.

This needs more thought.

rnk updated this revision to Diff 172054.Oct 31 2018, 5:01 PM
  • lit test config thing
This revision was automatically updated to reflect the committed changes.
Herald added a subscriber: Restricted Project. · View Herald TranscriptOct 31 2018, 5:02 PM