Merge commit bfb276e55c76 from upstream OpenZFS (by Jessica Clarke)
Once upon a time, 32-bit PowerPC did indeed have a 32-bit time_t, but
FreeBSD 12.0 switched to a 64-bit time_t for PowerPC as an ABI break,
which predates the addition of FreeBSD support to OpenZFS. Moreover,
64-bit PowerPC has existed since FreeBSD 9.0, where __powerpc__ is also
defined (alongside __powerpc64__ to disambiguate), which has always had
a 64-bit time_t. This code has therefore always been wrong for all
PowerPC variants. Fix this by limiting the 32-bit case to just i386,
which is the only architecture in FreeBSD to have a 32-bit time_t and
not have broken ABI, due to its special legacy compatibility status.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Jessica Clarke <jrtc27 at jrtc27.com>
Closes #18217
Closes #18218
Reported by: fuz
MFC after: 1 day
[clang][ARM] Refactor argument handling in `EmitAArch64BuiltinExpr` (2/2) (NFC)
Refactor `EmitAArch64BuiltinExpr` so that all AArch64/NEON builtins
handled by this hook _and marked as overloaded_ share a common path
for generating LLVM IR arguments (collected into the `Ops`
`SmallVector<Value*>`) (*). This is a follow-up for #181794 - please
refer to that PR for more context.
As in the previous PR, the key change is implemented in
`HasExtraNeonArgument` , i.e. in the hook that identifies Builtins with
the extra argument. In this PR, I am replacing the ad-hoc switch
statement with a more principled approach borrowed from SemaARM.cpp,
namely:
```cpp
uint64_t mask = 0;
switch (BuiltinID) {
#define GET_NEON_OVERLOAD_CHECK
#include "clang/Basic/arm_fp16.inc"
#include "clang/Basic/arm_neon.inc"
[28 lines not shown]
[HLSL] Define CBuffer field alignment for matrix types (#179836)
fixes https://github.com/llvm/llvm-project/issues/179834
Change defines Matrix alignment as buffer row length (16). Same as
arrays and structs.
Change also adds tests for matrix, matrix in structs, & arrays.
[clang][ARM] Refactor argument handling in `EmitAArch64BuiltinExpr` (1/2) (NFC)
Refactor `EmitAArch64BuiltinExpr` so that all AArch64/NEON builtins
handled by this hook _and marked as non-overloaded_ share a common path
for generating LLVM IR arguments (collected into the `Ops`
`SmallVector<Value*>`) (*)
Previously, the argument emission loop unconditionally skipped the
trailing argument:
```cpp
for (unsigned i = 0, e = E->getNumArgs() - 1; i != e; ++i)
```
This was originally intended to ignore the extra Sema-only argument
used by overloaded NEON builtins (e.g. the type discriminator passed
by `__builtin_neon_*` intrinsics). However, this logic was applied
unconditionally.
[37 lines not shown]
[HLSL][Cbuffer][Matrix] Add Cbuffer padding and createBufferMatrixTempAddress (#181903)
fixes #181901
This change detects when a HLSL Cbuffer matrix’s layout differs from its
in-memory type and materializes a temporary with the non-padded matrix
type. Matrix elements are copied explicitly from the padded buffer
layout into the temporary, ensuring correct addressing and avoiding
overlapping GEPs or incorrect vector flattening.
[NFC] Re-enable MSVC C4351 diagnostic (#182082)
From MSDN:
https://learn.microsoft.com/en-us/previous-versions/1ywe7hcy(v=vs.140)
This diagnostic is no longer documented in MSDN and from my local
testing, the diagnostic is not emitted in our source. I believe we no
longer need to disable this diagnostic.
[lldb] Allow tests to share a single build (#181720)
This changes Python API tests to use a single build shared across all
test functions, instead of the previous default behavior of a separate
build dir for each test function.
This build behavior opt-out, tests can use the previous behavior of one
individual (unshared) build directory per test function, by setting
`SHARED_BUILD_TESTCASE` to False (in the test class).
The motivation is to make the test suite more efficient, by not
repeatedly building the same test source. When running tests on my macOS
machine, this reduces the time of `ninja check-lldb-api` by almost 60%
(sample numbers: from ~492s down to ~207s = 58%). Almost 5min time
saved.
Each test function still calls `self.build()`, but only the first call
will do a build, in the subsequent tests `make` will be a no-op because
the sources won't have changed.
[CIR][NEON] Add lowering for `vfmah_f16` and `vfmsh_f16` (#181148)
As with other NEON builtins, reuse the existing default-lowering
tests to validate the CIR lowering path.
kqueue: Make kn_sfflags unsigned
This is used to hold a copy of the original fflags, which is unsigned.
MFC after: 3 days
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D55348
[MLIR][XeGPU] Add LANE level integration test without XeGPU ops. (#181891)
XeGPU LANE level integration test lacks a test without usage of any
XeGPU dialect ops.
Add an integration test without XeGPU dialect ops.
[AMDGPU] Add WMMA and SWMMAC instructions for gfx1170 (#180731)
Introduce two new subtarget features:
- WMMA256bInsts for GFX11 WMMA instructions and
- WMMA128bInsts for GFX1170 and GFX12 WMMA and SWMMAC instructions
Some WMMA instructions have changed from GFX 11.0 to GFX 11.7 so new
Real versions were added with "_gfx1170" suffix. For consistency all
WMMA and SWMMAC GFX11.7 instructions use this suffix.
To resolve decoding issues between different formats for some WMMA
instructions between GFX 11 and GFX 11.7, new decoding tables were
added.
[clang] Ensure -mno-outline adds attributes (#163692)
Before this change, `-mno-outline` and `-moutline` only controlled the
pass pipelines for the invoked compiler/linker.
The drawback of this implementation is that, when using LTO, only the
flag provided to the linker invocation is honoured (and any files which
individually use `-mno-outline` will have that flag ignored).
This change serialises the `-mno-outline` flag into each function's
IR/Bitcode, so that we can correctly disable outlining from functions in
files which disabled outlining, without affecting outlining choices for
functions from other files. This matches how other optimisation flags
are handled so the IR/Bitcode can be correctly merged during LTO.
Reimport security/polarssl as security/mbedtls
mbedtls-3.6.5 is a SECURITY update over mbedtls-2.18.10 from
security/polarssl.
pkg/DESCR (slightly outdated):
PolarSSL is a fully featured and standards compliant SSL library offering
server and client functionality (SSLv3, TLSv1.0, TLSv1.1 and TLSv1.2) with
an intuitive API and readable source code. Dual license (GPLv2+/commercial).
Non-standard extensions include: SSL Session Tickets (RFC 5077), Server
Name Indication (SNI) (RFC 6066), Truncated HMAC (RFC 6066), Max Fragment
Length (RFC 6066), and Secure Renegotiation (RFC 5746).
Symmetric algorithms: AES, Blowfish, 3DES, DES, ARC4, Camellia, XTEA
Modes: ECB, CBC, CFB, CTR, GCM
Hashes: MD2, MD4, MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, RIPEMD-160
PolarSSL has its own big number library. Its RSA implementation supports both
[8 lines not shown]
[CIR][NFC] Remove synthetic attribute from TryOp (#181915)
Remove the synthetic attribute from TryOp, which will not be needed
anymore and will be replaced by CleanupScopeOp