[libc] Add implementations of nextafter[f|l] functions.
authorSiva Chandra Reddy <sivachandra@google.com>
Mon, 4 Jan 2021 06:33:48 +0000 (22:33 -0800)
committerSiva Chandra Reddy <sivachandra@google.com>
Wed, 6 Jan 2021 06:32:39 +0000 (22:32 -0800)
commit7f7b0dc4e15fac5f91f8f6dcc7f91c9025f41ae0
treed4b5b63690e551bb5f8e81e56270aa5b43f3c3d7
parent993d8ac5cb935b78fb136c25a7e4bae18852f429
[libc] Add implementations of nextafter[f|l] functions.

A differential fuzzer for these functions has also been added.
Along the way, a small correction has been done to the normal/subnormal
limits of x86 long double values.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D94109
21 files changed:
libc/config/linux/aarch64/entrypoints.txt
libc/config/linux/x86_64/entrypoints.txt
libc/fuzzing/math/CMakeLists.txt
libc/fuzzing/math/Compare.h
libc/fuzzing/math/nextafter_differential_fuzz.cpp [new file with mode: 0644]
libc/spec/stdc.td
libc/src/math/CMakeLists.txt
libc/src/math/nextafter.cpp [new file with mode: 0644]
libc/src/math/nextafter.h [new file with mode: 0644]
libc/src/math/nextafterf.cpp [new file with mode: 0644]
libc/src/math/nextafterf.h [new file with mode: 0644]
libc/src/math/nextafterl.cpp [new file with mode: 0644]
libc/src/math/nextafterl.h [new file with mode: 0644]
libc/test/src/math/CMakeLists.txt
libc/test/src/math/NextAfterTest.h [new file with mode: 0644]
libc/test/src/math/nextafter_test.cpp [new file with mode: 0644]
libc/test/src/math/nextafterf_test.cpp [new file with mode: 0644]
libc/test/src/math/nextafterl_test.cpp [new file with mode: 0644]
libc/utils/FPUtil/LongDoubleBitsX86.h
libc/utils/FPUtil/ManipulationFunctions.h
libc/utils/FPUtil/NextAfterLongDoubleX86.h [new file with mode: 0644]