This is an archive of the discontinued LLVM Phabricator instance.

[libc] Support 32-bit ARM platform tests
ClosedPublic

Authored by ddcc on Apr 21 2022, 3:12 PM.

Details

Summary

Set LONG_DOUBLE_IS_DOUBLE, add ifdefs for 128-bit integer types

Diff Detail

Event Timeline

ddcc created this revision.Apr 21 2022, 3:12 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 21 2022, 3:12 PM
ddcc requested review of this revision.Apr 21 2022, 3:12 PM
ddcc added a reviewer: lntue.Apr 26 2022, 10:26 AM
lntue accepted this revision.Apr 26 2022, 1:34 PM
This revision is now accepted and ready to land.Apr 26 2022, 1:34 PM

you'll probably also need to add #ifdef conditions to src/__support/CPP/Limits.h and its corresponding test.

ddcc updated this revision to Diff 425356.Apr 26 2022, 5:25 PM

Add more ifdef coverage

ddcc added a comment.Apr 26 2022, 5:25 PM

you'll probably also need to add #ifdef conditions to src/__support/CPP/Limits.h and its corresponding test.

Thanks, I've been testing against an older fork and missed some of these changes.

I've added a few comments, and I've also started a thread on the LLVM discourse page for discussing plans for building LLVM-libc on arm32: https://discourse.llvm.org/t/building-llvm-libc-for-arm32/62092 if you want to join.

libc/test/src/__support/str_to_float_test.cpp
275

these shouldn't be necessary, since arm32 uses long doubles as doubles, which is caught by the condition above.

libc/test/src/stdlib/strtold_test.cpp
18

for these tests I would recommend disabling strtold as an entrypoint instead of putting the whole test file in an #ifdef. If you want, you can add a TODO for me to look into changing this test to not use uint128 when it doesn't need it.

ddcc added inline comments.Apr 27 2022, 5:27 PM
libc/test/src/stdlib/strtold_test.cpp
18

Are you referring to libc/config/darwin/arm/entrypoints.txt? Or omitting strtold_tests from libc/test/src/stdlib/CMakeLists.txt for arm?

ddcc updated this revision to Diff 425657.Apr 27 2022, 5:27 PM

Remove unnecessary changes to str_to_float_test.cpp

michaelrj added inline comments.Apr 28 2022, 10:28 AM
libc/test/src/__support/str_to_float_test.cpp
300

these also should be handled by the LONG_DOUBLE_IS_DOUBLE condition

libc/test/src/stdlib/strtold_test.cpp
18

actually, I think this is fine for now. I'll look into cleaning it up when I get the chance.

This revision was automatically updated to reflect the committed changes.
ddcc marked an inline comment as not done.