OSDN Git Service

[libc] Add implementations of lround[f|l] and llround[f|l].
authorSiva Chandra Reddy <sivachandra@google.com>
Wed, 9 Dec 2020 05:44:22 +0000 (21:44 -0800)
committerSiva Chandra Reddy <sivachandra@google.com>
Fri, 11 Dec 2020 19:12:40 +0000 (11:12 -0800)
commit7aeb3804c46cc6c8f291415ca09ae34021301eb8
tree872edbd2a77572734c36077c509c36911623e012
parenta593d223c50f45a25316f948ea4ed222fb244daa
[libc] Add implementations of lround[f|l] and llround[f|l].

A new function to MPFRWrapper has been added, which is used to set up
the unit tests.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D93007
28 files changed:
libc/config/linux/x86_64/entrypoints.txt
libc/spec/spec.td
libc/spec/stdc.td
libc/src/math/CMakeLists.txt
libc/src/math/llround.cpp [new file with mode: 0644]
libc/src/math/llround.h [new file with mode: 0644]
libc/src/math/llroundf.cpp [new file with mode: 0644]
libc/src/math/llroundf.h [new file with mode: 0644]
libc/src/math/llroundl.cpp [new file with mode: 0644]
libc/src/math/llroundl.h [new file with mode: 0644]
libc/src/math/lround.cpp [new file with mode: 0644]
libc/src/math/lround.h [new file with mode: 0644]
libc/src/math/lroundf.cpp [new file with mode: 0644]
libc/src/math/lroundf.h [new file with mode: 0644]
libc/src/math/lroundl.cpp [new file with mode: 0644]
libc/src/math/lroundl.h [new file with mode: 0644]
libc/test/src/math/CMakeLists.txt
libc/test/src/math/RoundToIntegerTest.h [new file with mode: 0644]
libc/test/src/math/llround_test.cpp [new file with mode: 0644]
libc/test/src/math/llroundf_test.cpp [new file with mode: 0644]
libc/test/src/math/llroundl_test.cpp [new file with mode: 0644]
libc/test/src/math/lround_test.cpp [new file with mode: 0644]
libc/test/src/math/lroundf_test.cpp [new file with mode: 0644]
libc/test/src/math/lroundl_test.cpp [new file with mode: 0644]
libc/utils/FPUtil/CMakeLists.txt
libc/utils/FPUtil/NearestIntegerOperations.h
libc/utils/MPFRWrapper/MPFRUtils.cpp
libc/utils/MPFRWrapper/MPFRUtils.h