This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add math functions to Windows's entrypoints
AbandonedPublic

Authored by hedingarcia on Jul 16 2021, 12:19 PM.

Details

Summary

Expanded a list of math functions, that do not depend on the MPFR
library, to be successfully tested in Windows. Placed identifiers
for Windows that disable members that are not needed in FEnv.h.
This was done to meet a static assert of the internal floating point
state and the public fenv_t type to avoid build errors for Windows.
Refactored NextAfterTest.h to correctly define bitWidthOfType
for both Linux and Windows.

Diff Detail

Event Timeline

hedingarcia created this revision.Jul 16 2021, 12:19 PM
hedingarcia requested review of this revision.Jul 16 2021, 12:19 PM
aeubanks added inline comments.Jul 16 2021, 12:21 PM
libc/utils/FPUtil/x86_64/FEnv.h
94

this change isn't obvious and isn't described in the commit description, it'd be nice to add why this change was made

[libc] Fixed commit description and ran clang-format

hedingarcia edited the summary of this revision. (Show Details)Jul 16 2021, 1:20 PM
sivachandra added inline comments.Jul 20 2021, 11:09 AM
libc/config/windows/entrypoints.txt
69

Can you add nextafter functions in a different patch along with the fix in NextAfterTest.h.

libc/test/src/math/NextAfterTest.h
26

As pointed out above, can you move this to a separate patch?

libc/utils/FPUtil/x86_64/FEnv.h
94

Can you split this into a different patch.

356

Leave this out as this is not the correct fix. We can make another pass, when we enable the fenv functions, to fix these up correctly.

366

Same here.

hedingarcia abandoned this revision.Jul 21 2021, 10:26 AM