[all-commits] [llvm/llvm-project] a98243: [libc] Add platform independent floating point rou...

lntue via All-commits all-commits at lists.llvm.org
Mon Jun 12 06:37:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a98243129530c852cbd42bffafc74ab635934d8a
      https://github.com/llvm/llvm-project/commit/a98243129530c852cbd42bffafc74ab635934d8a
  Author: Tue Ly <lntue at google.com>
  Date:   2023-06-12 (Mon, 12 Jun 2023)

  Changed paths:
    M libc/src/__support/CMakeLists.txt
    M libc/src/__support/FPUtil/CMakeLists.txt
    M libc/src/__support/FPUtil/Hypot.h
    M libc/src/__support/FPUtil/NearestIntegerOperations.h
    M libc/src/__support/FPUtil/except_value_utils.h
    M libc/src/__support/FPUtil/generic/CMakeLists.txt
    M libc/src/__support/FPUtil/generic/FMA.h
    M libc/src/__support/FPUtil/generic/sqrt.h
    M libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h
    A libc/src/__support/FPUtil/rounding_mode.h
    M libc/src/__support/str_to_float.h
    M libc/src/math/generic/CMakeLists.txt
    M libc/src/math/generic/atanf.cpp
    M libc/src/math/generic/coshf.cpp
    M libc/src/math/generic/exp10f.cpp
    M libc/src/math/generic/exp2f.cpp
    M libc/src/math/generic/expf.cpp
    M libc/src/math/generic/expm1f.cpp
    M libc/src/math/generic/sincosf.cpp
    M libc/src/math/generic/sinf.cpp
    M libc/src/math/generic/sinhf.cpp
    M libc/src/math/generic/tanhf.cpp
    M libc/src/stdio/printf_core/CMakeLists.txt
    M libc/src/stdio/printf_core/float_dec_converter.h
    M libc/src/stdio/printf_core/float_hex_converter.h
    M libc/test/src/__support/FPUtil/CMakeLists.txt
    A libc/test/src/__support/FPUtil/rounding_mode_test.cpp
    M utils/bazel/llvm-project-overlay/libc/BUILD.bazel

  Log Message:
  -----------
  [libc] Add platform independent floating point rounding mode checks.

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

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D152280




More information about the All-commits mailing list