[libc][math] Fix `sinpif` and `sinpif16` error handling (#235780)
Follow up of https://github.com/llvm/llvm-project/pull/235296, tested
both functions with CORE-MATH's exhaustive checker in all four rounding
modes. With `CORE_MATH_SUPPORT_ERRNO` and `CORE_MATH_CHECK_INEXACT`
enabled.
- Set ERANGE for underflow in sinpif and sinpif16.
- Raise missing underflow exceptions in sinpif16.
- Return exact half-integer results in sinpif16 without raising
FE_INEXACT.
[AArch64][MachineOutliner] Fix up SP add/sub immediates in outlined sequences (#191120)
Extend the AArch64 machine outliner to handle ADDXri/SUBXri instructions
that read SP when the outlined function saves LR on the stack, shifting
SP down by 16.
Previously only loads/stores with an SP base were adjusted. This patch
adds support for ADDXri and SUBXri with an SP source operand, correctly
re-encoding the adjusted offset and changing the opcode when the sign
flips. Unencodable adjusted offsets cause the candidate to be rejected
during the safety check, preventing illegal outlining.
security/openpgp-card-tools: [NEW PORT] CLI tool for interacting with OpenPGP cards
The openpgp-card-tools package provides 'oct', a command-line tool for
interacting with OpenPGP cards (YubiKey, Nitrokey and other
OpenPGP-compliant smart cards and security tokens). It supports listing
card information, managing PINs, generating and importing keys, and
performing cryptographic operations directly on the hardware.
WWW: https://codeberg.org/openpgp-card/openpgp-card-tools
PR: 293960
Co-authored-by: alven@
Take the FreeBSD kexts from nextbsd-kernel-extensions (#591)
IntelWiFi and IntelEthernet now build in the new nextbsd-kernel-extensions
and ship as freebsd-kexts-amd64.tar.gz (nextbsd/nextbsd#554); fetch that
instead of the two Intel tarballs from the graphics repo.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[mlir][VCIX] Check legalized type before use in math.tan test pattern (#236051)
`MathTanToVCIX` called `getElementType()` on the result of
`legalizeVectorType()` before checking whether legalization failed. For
types it can't legalize (scalars, multi-dimensional vectors, scalable
vectors with unsupported element types) that result is null, so the
pattern crashed instead of leaving the op alone like the cos, sin and
log patterns do.
This moves the null check above the first use and adds tests for a
scalar `math.tan` and a `vector<2x4xf32>` one.
Fixes #231844
Merge tag 'm68knommu-for-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu updates from Greg Ungerer:
"Platform code added for the ColdFire 54418 RNG hardware block. Also
PWM address definitions for the 54418. A fix for seccomp filter
processing during system call entry and a fix for compiling the
Cleopatra board target. A config update for the stmark board, and
lastly a couple of typo fixes"
* tag 'm68knommu-for-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
m68k: coldfire: Add RNG support for MCF54418
m68k: mcf5441x: add PWM defines
m68knommu: fix compile breakage for 5407 cleopatra board
m68k: defconfig: update stmark2 defconfig
m68k: Fix seccomp filtering on ColdFire and 68000
m68k: remove unused <asm/quicc_simple.h> header
m68k: fix typo "eanble" in comment
m68k: coldfire: fix typos in reset.c comment
Merge tag 'trace-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull tracing updates from Steven Rostedt:
- Add "within" to filter logic
Add a way to trace events by what function they fall in.
echo 'within == "vfs_read" > events/sched/sched_switch/filter
Will only trigger sched_switch events that happen within the vfs_read
function. It uses a stacktrace at the event and checks if any entry
is within the specified function and if so, it prints the event.
- Remove a duplicate definition of ftrace_set_clr_event() from the
header
- Do not have ftrace_set_clr_event() modify its input buffer
[118 lines not shown]
libthr/thr_mutex.c: make mutex asserts more useful
Print the file and line number of the caller where the assert fired.
Use _thread_exitf() directly for this.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
[mlir][acc] Cache symbol lookups in ACCImplicitData (#236237)
ACCImplicitData resolves the global behind every candidate variable with
SymbolTable::lookupNearestSymbolFrom, through isDeviceAccessibleValue,
isInDeviceMemoryValue and the FIR type-interface models. Without a table
each lookup scans every top-level op of the module, so on a module with
thousands of symbols this dominates the pass.
Let callers pass an optional SymbolTableCollection to
isDeviceAccessibleValue, isInDeviceMemoryValue, isValidValueUse and
OpenACCSupport::isValidValueUse, and add it as a trailing parameter of
the
PointerLikeType and MappableType isDeviceAccessible / isInDeviceMemory
interface methods. ACCImplicitData keeps one collection for the duration
of a run. Passing no collection keeps the previous behavior.
This can speedup the pass by 4.5x on a large TU with a lots of symbols.
[Support][mlir] Allow custom prefixes in SourceMgrDiagnosticVerifier (#227568)
Allow callers to choose the directive prefixes (default: `expected`),
like Clang's `-verify=<prefixes>`, so that one test file can be shared
between RUN lines with different expectations.
A prefix now has to be at the start of the line or follow a character
other than `[[:alnum:]_-]`, so that `expected-error` is no longer found
inside e.g. `unexpected-error`. This also applies to MLIR.
Assisted-by: AI tooling
Pull-Request: https://github.com/llvm/llvm-project/pull/227568
[RISCV][P-ext] Add isel pattern for mulsu.h11/maccsu.h11 (#236118)
`mulsu.h11` multiplies the sign-extended upper half word of rs1 by the
zero-extended upper half word of rs2. `maccsu.h11` adds the product to
rd.
Previously, (sra X, 16) and (srl X, 16) were selected as separate
srai/srli instructions feeding `mul` or `maccsu.h00`. Match them
directly
so both shifts are folded. As with `maccsu.h00`, the maccsu pattern
requires the multiply to have a single use.
[flang] Evaluate InElemental() at most once per scope (#236235)
`CheckHelper::InElemental()` called `IsElementalProcedure()` on every
use. That characterizes the whole enclosing procedure, including every
dummy argument and the folding of its shape. `CheckObjectEntity()` calls
`InElemental()` for each object entity, so declaration checking was
quadratic in the number of dummy arguments: issue 236223 has the
reproducer and the profile.
This caches the result for the innermost procedure symbol and resets it
whenever `CheckHelper::Check(const Scope &)` changes that symbol.
Diagnostics are unchanged: `IsElementalProcedure()` is still the only
source of the answer, just evaluated once per scope instead of once per
entity.
With the issue's generator, `-fsyntax-only` is now linear in the number
of dummies: at 800 explicit-shape dummies it goes from 24.8 G to 0.44 G
instructions (about 56x). `check-flang` passes.
[2 lines not shown]
[AArch64][MTE] Tag dynamic allocas in AArch64StackTagging
Instrument dynamic allocas in the memtag-stack pass, more or less
following the the way AddressSanitizer does: by instrumenting
stackrestore to un(poison/tag) allocas when free'd.
- Dynamic allocas are given 16-byte alignment and padded to 16-bytes.
- At lifetime.start (or at the alloca if no lifetimes), the dynamic
alloca is tagged.
- The most recently executed dynamic alloca is tracked in an extra
per-func static alloca. The address of this static alloca is used
as the bottom (highest address) of the dynamic alloca section of
the frame, while the value stored there is treated as the current
top (lowest address) of the frame.
- At llvm.stackrestores, memory is untagged from the restored sp
to the last executed dynamic alloca.
- At function returns, memory is untagged from the last executed
dynamic alloca to the bottom of the (dynamic alloca section of) the
frame.
[2 lines not shown]
Take the FreeBSD kexts from nextbsd-kernel-extensions
IntelWiFi and IntelEthernet now build in the new nextbsd-kernel-extensions
and ship as freebsd-kexts-amd64.tar.gz (nextbsd/nextbsd#554); fetch that
instead of the two Intel tarballs from the graphics repo.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[AArch64][MTE] Tag dynamic allocas in AArch64StackTagging
Instrument dynamic allocas in the memtag-stack pass, more or less
following the the way AddressSanitizer does: by instrumenting
stackrestore to un(poison/tag) allocas when free'd.
- Dynamic allocas are given 16-byte alignment and padded to 16-bytes.
- At lifetime.start (or at the alloca if no lifetimes), the dynamic
alloca is tagged.
- The most recently executed dynamic alloca is tracked in an extra
per-func static alloca. The address of this static alloca is used
as the bottom (highest address) of the dynamic alloca section of
the frame, while the value stored there is treated as the current
top (lowest address) of the frame.
- At llvm.stackrestores, memory is untagged from the restored sp
to the last executed dynamic alloca.
- At function returns, memory is untagged from the last executed
dynamic alloca to the bottom of the (dynamic alloca section of) the
frame.
[2 lines not shown]