[libc-commits] [PATCH] D152280: [libc] Add platform independent floating point rounding mode checks.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Jun 6 08:56:58 PDT 2023


lntue created this revision.
lntue added reviewers: michaelrj, sivachandra.
Herald added a subscriber: tschuett.
Herald added projects: libc-project, All.
lntue requested review of this revision.

Many math functions need to check for floating point rounding modes to
return correct values.  Currently most of them use the internal implementation
of `fegetround`, which is platform-dependent and blocking math functions to be
enabled on platforms with unimplemented `fegetround`.  In this change, we add
platform independent rounding mode checks and switching math functions to use
them instead. https://github.com/llvm/llvm-project/issues/63016


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152280

Files:
  libc/src/__support/FPUtil/FEnvImpl.h
  libc/src/__support/FPUtil/Hypot.h
  libc/src/__support/FPUtil/NearestIntegerOperations.h
  libc/src/__support/FPUtil/except_value_utils.h
  libc/src/__support/FPUtil/generic/FMA.h
  libc/src/__support/FPUtil/generic/sqrt.h
  libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h
  libc/src/__support/str_to_float.h
  libc/src/math/generic/atanf.cpp
  libc/src/math/generic/coshf.cpp
  libc/src/math/generic/exp10f.cpp
  libc/src/math/generic/exp2f.cpp
  libc/src/math/generic/expf.cpp
  libc/src/math/generic/expm1f.cpp
  libc/src/math/generic/sincosf.cpp
  libc/src/math/generic/sinf.cpp
  libc/src/math/generic/sinhf.cpp
  libc/src/math/generic/tanhf.cpp
  libc/src/stdio/printf_core/float_dec_converter.h
  libc/src/stdio/printf_core/float_hex_converter.h
  libc/test/src/__support/FPUtil/CMakeLists.txt
  libc/test/src/__support/FPUtil/fenvimpl_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152280.528892.patch
Type: text/x-patch
Size: 21539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230606/162148cd/attachment-0001.bin>


More information about the libc-commits mailing list