Move the query-filters documentation into the API modules
The import contract of the API schemas does not allow an import of
truesearch_filters. The truesearch API modules took the limit and the
query-filters documentation from it. Each API version now holds them
as text. truesearch_filters keeps the Spotlight attribute and the
choices of each field. A unit test checks that the current API
documents each field and each choice.
[libc][math] Correct logb exceptions and nextup/down boundaries (#236473)
Fix logb so infinity does not raise FE_DIVBYZERO and signaling NaNs
raise
FE_INVALID and return a quiet NaN. Correct nextup/nextdown's
finite-to-infinity
and binary80 normal/subnormal steps.
Use bit-based zero checks to avoid FE_DENORM on subnormal inputs. Extend
the
shared tests to check result bits, flags and logb errno.
Tests on x86-64 Linux: 18 focused Clang 18 fullbuild targets and 36
overlay
targets per compiler with GCC 13 and Clang 18.
Assisted-by: GitHub Copilot
---------
Signed-off-by: sriramshastry <sriramshastry at gmail.com>
[libc][test] Fix GoogleTest incompatibilities in unit tests (#239961)
llvm-libc unit tests are intended to target a source-compatible subset
of GoogleTest, dispatched through test/UnitTest/Test.h. Building and
running the unit test suite against real GoogleTest uncovered several
latent issues that LibcTest either did not exercise or silently
accepted:
- Several Linux sys/ tests included test/UnitTest/LibcTest.h directly
instead of routing through test/UnitTest/Test.h.
- rename_test.cpp included the raw Linux generated macro header
include/llvm-libc-macros/linux/unistd-macros.h directly, colliding
with system <unistd.h> enum constants when system headers are also
included; use the hdr/fcntl_macros.h and hdr/unistd_macros.h proxy
headers instead.
- src/ctype/toascii.h did not #undef a pre-existing XSI toascii macro
from system <ctype.h>, unlike src/ctype/isascii.h.
- Five test suites mixed TEST_F and TEST under the same suite name,
which GoogleTest rejects at runtime.
[14 lines not shown]
[libc] Add missing const in cpp::span and scanf_core::FormatSection (#240610)
cpp::span provided a constructor from non-const cpp::array<U, N> & but
missed the corresponding const cpp::array<U, N> & overload from C++20
std::span, and scanf_core::FormatSection::operator== lacked a const
qualifier. Add both so const span-based and scanf format-section
comparisons work without const_cast or mutable copies.
Part of #91630
Assisted-by: Gemini
[libc] Implement mtx_timedlock and pthread_mutex_timedlock (#240028)
This PR implements `mtx_timedlock` in `<threads.h>` and
`pthread_mutex_timedlock` in `<pthread.h>`.
- Connects to existing internal `Mutex::timed_lock(AbsTimeout)` and
handles timeout/expired specifications.
- Adds `mtx_timedlock` entrypoint in `libc/src/threads`.
- Adds `pthread_mutex_timedlock` entrypoint in `libc/src/pthread`.
- Adds `timed_lock` implementation for `Mutex` in single-thread mode
(`LIBC_THREAD_MODE_SINGLE`).
- Registers public declarations in `threads.yaml` and `pthread.yaml`.
- Registers entrypoints across Linux targets (`x86_64`, `aarch64`,
`riscv`).
- Adds timedlock tests to `mtx_test` and `pthread_mutex_test`.
Fixes #240021.
_splraise(): Don't take action if ipl is less than curipl.
Issue on ep93xx noted by Jonathan Chapman, and at91, footbridge, and
ixp12x0 have the same problem.
(becc is also wrong, but wrong differently.)
AMDGPU: Clear v_cmpx source kill flags locally
clearKillFlags is potentially expensive and should be avoided. When
the v_cmp is folded into a v_cmpx at the saveexec, only kills of
registers overlapping the compare sources between the v_cmp and the
saveexec become invalid. Clear those directly when applying the fold,
instead of collecting candidate kills during matching and then
clearing every kill of the sources in the function.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[DebugInfo] Don't emit broken location list entries for DW_OP_LLVM_implicit_pointer (#236703)
Related to https://github.com/llvm/llvm-project/pull/187642
---------
Co-authored-by: Shivam Kunwar <phyBrackets at users.noreply.github.com>
Revert "[Clang][DebugInfo] Use macro expansion locations by default" (#240671)
Reverts llvm/llvm-project#235205
This is buggy, we should still call getMacroDebugLoc in e.g.
```
SourceLocation NewLoc = SM.getExpansionLoc(getMacroDebugLoc(CGM, Loc));
```
and update `getMacroDebugLoc` to drop
```
if (CGM.getCodeGenOpts().DebugInfoMacroExpansionLoc)
return Loc;
```
and keep the depth fix flags.
[SandboxVec][DAG][Scheduler] Move notifier logic from Scheduler to DAG (NFC) (#239097)
When an instruction gets created we need to update the state of the
scheduler and the DAG.
Up until now this was done with callbacks invoked by the Context. This
works, but there is some tight coupling between the update of the DAG
and scheduler states and it is not obvious what happens in which
sequence. To help fix this, the patch removes the scheduler callback and
keeps only the DAG callback. The DAG callback delegates the scheduler
maintenance to two Scheduler functions, one called in the beginning and
one at the end.
Add truenas-truesearch to Build-Depends and rename the service
The package build runs alembic. Alembic imports every plugin. The
truesearch plugin imports truesearch_client, and truenas-truesearch
installs that module.
The service base checks the model names of the public methods. Each
name must start with the name of the service class. The models are
named Truesearch, so the class is named TruesearchService.
[LoongArch] Fold zero comparisons into integer selects (#234841)
Use the original integer operand as the MASKEQZ/MASKNEZ condition for
selects comparing against zero, eliminating one redundant SLTU/SLTUI
instruction per select and matching GCC code generation.
Rework cnmagic(9):
- No more re-defining cn_trap(), cn_isconsole(), etc. Intead...
- Always provide cpu_Debugger() and console_debugger() in kern_stub.c.
- Move cnmagic(9)-related bits from <sys/systm.h> to <dev/cons.h>.
- Make ch_check_magic() return true/false based on "magic sequence
matched, action taken", eliminating the cn_trapped dance many
drivers did.
- Add a way to explicitly set the action using an API setter, rather
than having to define a CPP macro at the right time.
- Update callers to always pass their cnmagic state by reference rather
than by value (which was fine as a pure macro interface, not so much
when function calls are involved).
Bonvenon al NetBSD 11.99.11.