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 |
|
#
111b062f |
| 11-Oct-2024 |
Shourya Goel <shouryagoel10000@gmail.com> |
[libc] Fix for adding macro I (#111872)
We have two (EDIT: 4) files in which we are using `I`. This PR replaces
them with alternatives like `i` and `IDX` etc.
|
#
46944b0c |
| 05-Oct-2024 |
Job Henandez Lara <jobhdezlara93@gmail.com> |
[libc] remove errno.h includes (#110934)
|
#
f6b2a222 |
| 01-Oct-2024 |
Michael Jones <michaelrj@google.com> |
[libc] Move struct Sign into LIBC_NAMESPACE (#110709)
The struct Sign should be in the correct namespace. Also update the various tests that use it.
|
Revision tags: llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
88f0dc48 |
| 15-Jul-2024 |
OverMighty <its.overmighty@gmail.com> |
[libc] Fix warnings emitted by GCC (#98751)
Fixes #98709.
|
#
afa6bed8 |
| 09-Jul-2024 |
Joseph Huber <huberjn@outlook.com> |
[libc] Fix integer `rint` variants on the GPU (#98095)
Summary: Currently these are implemented as a static cast on `__builtin_rint()` to a long. Howver, this is not strictly correct. The standard s
[libc] Fix integer `rint` variants on the GPU (#98095)
Summary: Currently these are implemented as a static cast on `__builtin_rint()` to a long. Howver, this is not strictly correct. The standard states that the output is unspecified, but most implementations, and the LLVM libc implementation, do some kind of guarantee on this beahvior. This is not guaranteed by just doing a cast. This patch just uses the generic versions until we implement `__builitin_lrint` correctly.
show more ...
|
Revision tags: llvmorg-18.1.8 |
|
#
f50656c5 |
| 10-Jun-2024 |
OverMighty <its.overmighty@gmail.com> |
[libc][math][c23] Add MPFR unit tests for {rint,lrint,llrint,lround,llround}f16 (#94473)
|
Revision tags: llvmorg-18.1.7, llvmorg-18.1.6 |
|
#
ecfb5d99 |
| 06-May-2024 |
Michael Flanders <flanders.michaelk@gmail.com> |
[libc][math] fix loose except check in `{EXPECT,ASSERT}_FP_EXCEPTION` macros (#88816)
Adds more FP test macros for the upcoming test adds for #61092 and the
issues opened from it: #88768, #88769, #
[libc][math] fix loose except check in `{EXPECT,ASSERT}_FP_EXCEPTION` macros (#88816)
Adds more FP test macros for the upcoming test adds for #61092 and the
issues opened from it: #88768, #88769, #88770, #88771, #88772.
Fix bug in `{EXPECT,ASSERT}_FP_EXCEPTION`. `EXPECT_FP_EXCEPTION(0)`
seems to be used to test that an exception did not happen, but it always
does `EXPECT_GE(... & 0, 0)` which never fails.
Update and refactor tests that break after the above bug fix. An
interesting way things broke after the above change is that
`ForceRoundingMode` and `quick_get_round()` were raising the inexact
exception, breaking a lot of the `atan*` tests.
The changes for all files other than `FPMatcher.h` and
`libc/test/src/math/smoke/RoundToIntegerTest.h` should have the same
semantics as before. For `RoundToIntegerTest.h`, lines 56-58 before the
changes do not always hold since this test is used for functions with
different exception and errno behavior like `lrint` and `lround`. I've
deleted those lines for now, but tests for those cases should be added
for the different nearest int functions to account for this.
Adding @nickdesaulniers for review.
show more ...
|
Revision tags: llvmorg-18.1.5 |
|
#
837dab96 |
| 23-Apr-2024 |
Roland McGrath <mcgrathr@google.com> |
[libc] Make fenv and math tests preserve fenv_t state (#89658)
This adds a new test fixture class FEnvSafeTest (usable as a base
class for other fixtures) that ensures each test doesn't perturb
th
[libc] Make fenv and math tests preserve fenv_t state (#89658)
This adds a new test fixture class FEnvSafeTest (usable as a base
class for other fixtures) that ensures each test doesn't perturb
the `fenv_t` state that the next test will start with. It also
provides types and methods tests can use to explicitly wrap code
under test either to check that it doesn't perturb the state or
to save and restore the state around particular test code.
All the fenv and math tests are updated to use this so that none
can affect another. Expectations that code under test and/or
tests themselves don't perturb state can be added later.
show more ...
|
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 |
|
#
2137894a |
| 20-Mar-2024 |
Guillaume Chatelet <gchatelet@google.com> |
[libc][NFC] Move `Sign` type to separate header (#85930)
|
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 ...
|
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 |
|
#
3eb1e6d8 |
| 06-Feb-2024 |
michaelrj-google <71531609+michaelrj-google@users.noreply.github.com> |
[libc] Move libc_errno inside of LIBC_NAMESPACE (#80774)
Having libc_errno outside of the namespace causes versioning issues when
trying to link the tests against LLVM-libc. Most of this patch is j
[libc] Move libc_errno inside of LIBC_NAMESPACE (#80774)
Having libc_errno outside of the namespace causes versioning issues when
trying to link the tests against LLVM-libc. Most of this patch is just
moving libc_errno inside the namespace in tests. This isn't necessary in
the function implementations since those are already inside the
namespace.
show more ...
|
#
ace383df |
| 30-Jan-2024 |
Guillaume Chatelet <gchatelet@google.com> |
[libc][NFC] Rename `FPBits` nan functions (#79998)
- [libc][NFC] Rename FPBits nan functions
- rename build_signaling_nan in signaling_nan
- rename build_quiet_nan to quiet_nan
|
Revision tags: llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
2856db0d |
| 23-Jan-2024 |
Guillaume Chatelet <gchatelet@google.com> |
[libc][NFC] Remove `FPBits` cast operator (#79142)
The semantics for casting can range from "bitcast" (same representation)
to "different representation", to "type promotion". Here we remove the
c
[libc][NFC] Remove `FPBits` cast operator (#79142)
The semantics for casting can range from "bitcast" (same representation)
to "different representation", to "type promotion". Here we remove the
cast operator and force usage of `get_val` as the only function to get
the floating point value, making the intent clearer and more consistent.
show more ...
|
#
dffa8039 |
| 23-Jan-2024 |
Guillaume Chatelet <gchatelet@google.com> |
[libc] Remove specific nan payload in math functions (#79133)
|
#
6b02d2f8 |
| 23-Jan-2024 |
Guillaume Chatelet <gchatelet@google.com> |
[reland][libc] Remove unnecessary `FPBits` functions and properties (#79128)
- reland #79113
- Fix aarch64 RISC-V build
|
#
b524eed9 |
| 23-Jan-2024 |
Guillaume Chatelet <gchatelet@google.com> |
Revert "[libc] Remove unnecessary `FPBits` functions and properties" (#79118)
Reverts llvm/llvm-project#79113
It broke aarch64 build bot machines.
|
#
3bc86bf3 |
| 23-Jan-2024 |
Guillaume Chatelet <gchatelet@google.com> |
[libc] Remove unnecessary `FPBits` functions and properties (#79113)
This patch reduces the surface of `FPBits`.
|
#
11ec512f |
| 18-Jan-2024 |
Guillaume Chatelet <gchatelet@google.com> |
[libc][NFC] Introduce a Sign type for FPBits (#78500)
Another patch is needed to cover `DyadicFloat` and `NormalFloat`
constructors.
|
#
3546f4da |
| 15-Dec-2023 |
Guillaume Chatelet <gchatelet@google.com> |
[libc][NFC] Rename `MANTISSA_WIDTH` in `FRACTION_LEN` (#75489)
This one might be a bit controversial since the terminology has been
introduced from the start but I think `FRACTION_LEN` is a better
[libc][NFC] Rename `MANTISSA_WIDTH` in `FRACTION_LEN` (#75489)
This one might be a bit controversial since the terminology has been
introduced from the start but I think `FRACTION_LEN` is a better name
here. AFAICT it really is "the number of bits after the decimal dot when
the number is in normal form."
`MANTISSA_WIDTH` is less precise as it's unclear whether we take the
leading bit into account.
This patch also renames most of the properties to use the `_LEN` suffix
and fixes useless casts or variables.
show more ...
|
#
493cc71d |
| 14-Dec-2023 |
Guillaume Chatelet <gchatelet@google.com> |
[libc][NFC] Remove MantissaWidth traits (#75458)
Same as #75362, the traits does not bring a lot of value over
`FloatProperties::MANTISSA_WIDTH` (or `FPBits::MANTISSA_WIDTH`).
|
#
7b387d27 |
| 11-Dec-2023 |
Guillaume Chatelet <gchatelet@google.com> |
[libc][NFC] Fix mixed up biased/unbiased exponent (#75037)
According to [wikipedia](https://en.wikipedia.org/wiki/Exponent_bias)
the "biased exponent" is the encoded form that is always positive
w
[libc][NFC] Fix mixed up biased/unbiased exponent (#75037)
According to [wikipedia](https://en.wikipedia.org/wiki/Exponent_bias)
the "biased exponent" is the encoded form that is always positive
whereas the unbiased form is the actual "real" exponent that can be
positive or negative.
`FPBits` seems to be using `unbiased_exponent` to describe the encoded
form (unsigned). This patch simply use `biased` instead of `unbiased`.
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2 |
|
#
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
|
Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4 |
|
#
678e3ee1 |
| 02-Sep-2023 |
Fangrui Song <i@maskray.me> |
[lldb] Fix duplicate word typos; NFC
Those fixes were taken from https://reviews.llvm.org/D137338
|
Revision tags: llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
a2df87c2 |
| 19-Jun-2023 |
Mikhail R. Gadelha <mikhail@igalia.com> |
[libc] Fix libmath test compilation when using UInt<T>
This patch: (1) adds the add_with_carry_const and sub_with_borrow_const constexpr calls to add and sub, respectively. Both add and sub are cons
[libc] Fix libmath test compilation when using UInt<T>
This patch: (1) adds the add_with_carry_const and sub_with_borrow_const constexpr calls to add and sub, respectively. Both add and sub are constexpr calls and were call the non-constexpr version of add/sub_with_borrow. (2) adds explicit UIntType construct calls in some fp tests.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D150223
show more ...
|