History log of /llvm-project/libc/src/__support/FPUtil/FEnvImpl.h (Results 1 – 25 of 33)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3
# 157c3fb8 15-Aug-2024 Petr Hosek <phosek@google.com>

[libc] Make sure we have RISC-V f or d extension before using it (#104476)

This matches what we do for other architectures.


Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# 5ff3ff33 12-Jul-2024 Petr Hosek <phosek@google.com>

[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)

This is a part of #97655.


# ce9035f5 12-Jul-2024 Mehdi Amini <joker.eph@gmail.com>

Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration" (#98593)

Reverts llvm/llvm-project#98075

bots are broken


# 3f30effe 11-Jul-2024 Petr Hosek <phosek@google.com>

[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)

This is a part of #97655.


# c9ee6b19 08-Jul-2024 lntue <35648136+lntue@users.noreply.github.com>

[libc][math] Implement cbrtf function correctly rounded to all rounding modes. (#97936)

Fixes https://github.com/llvm/llvm-project/issues/92874

Algorithm: Let `x = (-1)^s * 2^e * (1 + m)`.
- Ste

[libc][math] Implement cbrtf function correctly rounded to all rounding modes. (#97936)

Fixes https://github.com/llvm/llvm-project/issues/92874

Algorithm: Let `x = (-1)^s * 2^e * (1 + m)`.
- Step 1: Range reduction: reduce the exponent with:
```
y = cbrt(x) = (-1)^s * 2^(floor(e/3)) * 2^((e % 3)/3) * (1 + m)^(1/3)
```
- Step 2: Use the first 4 bit fractional bits of `m` to look up for a
degree-7 polynomial approximation to:
```
(1 + m)^(1/3) ~ 1 + m * P(m).
```
- Step 3: Perform the multiplication:
```
2^((e % 3)/3) * (1 + m)^(1/3).
```
- Step 4: Check for exact cases to prevent rounding and clear
`FE_INEXACT` floating point exception.
- Step 5: Combine with the exponent and sign before converting down to
`float` and return.

show more ...


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5
# 55d4a892 18-Apr-2024 Michael Jones <michaelrj@google.com>

[libc] fix FEnvImpl not using the proxy header (#89303)

In the recent fenv.h header cleanup, two FEnvImpl.h files were missed,
causing build issues. This patch fixes that.


Revision tags: llvmorg-18.1.4
# 5748ad84 05-Apr-2024 lntue <35648136+lntue@users.noreply.github.com>

[libc] Add proxy header math_macros.h. (#87598)

Context: https://github.com/llvm/llvm-project/pull/87017

- Add proxy header `libc/hdr/math_macros.h` that will:
- include `<math.h>` in overlay mod

[libc] Add proxy header math_macros.h. (#87598)

Context: https://github.com/llvm/llvm-project/pull/87017

- Add proxy header `libc/hdr/math_macros.h` that will:
- include `<math.h>` in overlay mode,
- include `"include/llvm-libc-macros/math-macros.h"` in full build mode.
- Its corresponding CMake target `libc.hdr.math_macros` will only depend
on `libc.include.math` and `libc.include.llvm-libc-macros.math_macros`
in full build mode.
- Replace all `#include "include/llvm-libc-macros/math-macros.h"` with
`#include "hdr/math_macros.h"`.
- Add dependency to `libc.hdr.math_macros` CMake target when using
`add_fp_unittest`.
- Update the remaining dependency.
- Update bazel overlay: add `libc:hdr_math_macros` target, and replacing
all dependency on `libc:llvm_libc_macros_math_macros` with
`libc:hdr_math_macros`.

show more ...


Revision tags: llvmorg-18.1.3
# 77118536 27-Mar-2024 Marc Auberer <marc.auberer@chillibits.com>

[libc] Remove obsolete LIBC_HAS_BUILTIN macro (#86554)

Fixes #86546 and removes the macro `LIBC_HAS_BUILTIN`. This was
necessary to support older compilers that did not support
`__has_builtin`. Al

[libc] Remove obsolete LIBC_HAS_BUILTIN macro (#86554)

Fixes #86546 and removes the macro `LIBC_HAS_BUILTIN`. This was
necessary to support older compilers that did not support
`__has_builtin`. All of the compilers we support already have this
builtin.
See: https://libc.llvm.org/compiler_support.html
All uses now use `__has_builtin` directly

cc @nickdesaulniers

show more ...


Revision tags: llvmorg-18.1.2
# 5d56b348 18-Mar-2024 Michael Jones <michaelrj@google.com>

[libc] Remove direct math.h includes (#85324)

Reland of #84991

A downstream overlay mode user ran into issues with the isnan macro not
working in our sources with a specific libc configuration. Thi

[libc] Remove direct math.h includes (#85324)

Reland of #84991

A downstream overlay mode user ran into issues with the isnan macro not
working in our sources with a specific libc configuration. This patch
replaces the last direct includes of math.h with our internal
math_macros.h, along with the necessary build system changes.

show more ...


# 0646bbc4 14-Mar-2024 Michael Jones <michaelrj@google.com>

Revert "[libc] Remove direct math.h includes from src" (#85314)

Reverts llvm/llvm-project#84991

Caused build failures


# caba6d13 14-Mar-2024 Michael Jones <michaelrj@google.com>

[libc] Remove direct math.h includes from src (#84991)

A downstream overlay mode user ran into issues with the isnan macro not
working in our sources with a specific libc configuration. This patch
r

[libc] Remove direct math.h includes from src (#84991)

A downstream overlay mode user ran into issues with the isnan macro not
working in our sources with a specific libc configuration. This patch
replaces the last direct includes of math.h with our internal
math_macros.h, along with the necessary build system changes.

show more ...


Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5
# 86c57b97 14-Nov-2023 lntue <35648136+lntue@users.noreply.github.com>

[libc][arm] Use __ARM_FP to detect floating point support for FEnvImpl. (#72177)

https://github.com/llvm/llvm-project/issues/72157


# 6899f035 13-Nov-2023 lntue <35648136+lntue@users.noreply.github.com>

[libc] Check if arm targets support FPSCR in FEnvImpl.h. (#72158)

https://github.com/llvm/llvm-project/issues/72157


Revision tags: llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3
# e3087c4b 01-May-2023 Mikhail R. Gadelha <mikhail@igalia.com>

[libc] Start to refactor riscv platform abstraction to support both 32 and 64 bits versions

This patch enables the compilation of libc for rv32 by unifying the
current rv64 and rv32 implementation i

[libc] Start to refactor riscv platform abstraction to support both 32 and 64 bits versions

This patch enables the compilation of libc for rv32 by unifying the
current rv64 and rv32 implementation into a single rv implementation.

We updated the cmake file to match the new riscv32 arch and force
LIBC_TARGET_ARCHITECTURE to be "riscv" whenever we find "riscv32" or
"riscv64". This is required as LIBC_TARGET_ARCHITECTURE is used in the
path for several platform specific implementations.

Reviewed By: michaelrj

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

show more ...


# b6bc9d72 26-Sep-2023 Guillaume Chatelet <gchatelet@google.com>

[libc] Mass replace enclosing namespace (#67032)

This is step 4 of
https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079


# 270547f3 21-Sep-2023 Guillaume Chatelet <gchatelet@google.com>

[libc][clang-tidy] Add llvm-header-guard to get consistant naming and prevent file copy/paste issues. (#66477)


# 9fa79985 09-Jun-2023 Petr Hosek <phosek@google.com>

[libc] Support for riscv32

This change adds basic support for baremetal riscv32 configuration.

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


# 055be3c3 14-Jun-2023 Tue Ly <lntue@google.com>

[libc] Enable hermetic floating point tests again.

Fixing an issue with LLVM libc's fenv.h defined rounding mode macros
differently from system libc, making get_round() return different values from

[libc] Enable hermetic floating point tests again.

Fixing an issue with LLVM libc's fenv.h defined rounding mode macros
differently from system libc, making get_round() return different values from
fegetround(). Also letting math tests to skip rounding modes that cannot be
set. This should allow math tests to be run on platforms in which fenv.h is not
implemented yet.

This allows us to re-enable hermatic floating point tests in
https://reviews.llvm.org/D151123 and reverting https://reviews.llvm.org/D152742.

Reviewed By: jhuber6

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

show more ...


Revision tags: llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4
# e9be85da 08-Mar-2023 Mikhail R. Gadelha <mikhail@igalia.com>

[libc] Add fenv_t and signal macros in riscv

This patch now enables full build.

Reviewed By: sivachandra

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


# 6f8dfeee 08-Mar-2023 Siva Chandra <sivachandra@google.com>

[libc] Add riscv64 fenv implementation and enable the fenv.h functions.

Reviewed By: mikhail.ramalho

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


# 31c39439 06-Mar-2023 Tue Ly <lntue@google.com>

[libc][math] Switch math functions to use libc_errno and fix some errno and floating point exceptions.

Switch math functions to use libc_errno and fix some errno and
floating point exceptions

Revie

[libc][math] Switch math functions to use libc_errno and fix some errno and floating point exceptions.

Switch math functions to use libc_errno and fix some errno and
floating point exceptions

Reviewed By: sivachandra

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

show more ...


# ae8e1b8f 06-Mar-2023 Siva Chandra Reddy <sivachandra@google.com>

[libc] Add arm 32 FEnvImpl.

Reviewed By: lntue

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


# effd56b0 01-Mar-2023 Michael Jones <michaelrj@google.com>

[libc] add basic Intel MacOS configuration

The config is based on the ARM MacOS config, but with fenv and math
functions disabled.

This should unblock this bug: https://github.com/llvm/llvm-project

[libc] add basic Intel MacOS configuration

The config is based on the ARM MacOS config, but with fenv and math
functions disabled.

This should unblock this bug: https://github.com/llvm/llvm-project/issues/60910

Reviewed By: sivachandra

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

show more ...


Revision tags: llvmorg-16.0.0-rc3
# 0aa9593c 19-Feb-2023 Tue Ly <lntue@google.com>

[libc][math] Set floating point exceptions for exp*f, sinhf, and coshf.

Set FE_OVERFLOW and FE_UNDERFLOW for expf, exp2f, exp10f, expm1f, sinhf
and coshf.

Reviewed By: sivachandra, renyichen

Diffe

[libc][math] Set floating point exceptions for exp*f, sinhf, and coshf.

Set FE_OVERFLOW and FE_UNDERFLOW for expf, exp2f, exp10f, expm1f, sinhf
and coshf.

Reviewed By: sivachandra, renyichen

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

show more ...


# e2f8c556 09-Feb-2023 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] separate macros in several targets


12