[clang][ARM] Add MSVC intrinsics for 32-bit Arm (#240573)
MSVC's ARM compiler expands these inline: _MulHigh, _MulUnsignedHigh,
the _Count* and _Copy* families, _InterlockedAdd and its variants,
_ReadStatusReg and __prefetch. clang had most of them only for AArch64,
so on 32-bit Arm they were undeclared or became calls to functions that
don't exist.
The ones AArch64 already has now go through EmitMSVCBuiltinExpr, so both
targets use the same code. This also stops AArch64 from evaluating the
first argument of _InterlockedAdd twice. intrin.h and intrin0.h declare them
once for both. _ReadStatusReg takes 0 (APSR) or 1 (SPSR), as with MSVC.
Assisted-by: Claude Opus 5.5 (Anthropic)
Instead of failing hard when encountering ESPI interrupts simply
ignore them for now until we have proper ESPI support.
This fixes ACPI boot on Snapdragon X2 SoCs where the ACPI advertises
ESPI interrupts for the SMMUv3. smmu(4) still works without those
interrupts but won't receive fault or error events.
Tested on a HP Elitebook X G2q
ok phessler@ kettenis@
[clang][Mips] Use the ISA features instead of CPU name checks (#245672)
getISARev(), processorSupportsGPR64(), the nan2008 and FP mode
defaults, the checks in validateTarget() and the sync compare and swap
macros all checked the CPU name. Set the ISA level and revision from
the target features in handleTargetFeatures and use those instead.
_MIPS_ARCH, _MIPS_ARCH_<CPU> and __OCTEON__ still use the CPU name,
since they name the CPU, as GCC does.
No functional change.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[CIR] Keep complex mul and div constrained in strict FP functions
In a strictfp function ClangIR emitted plain `fmul`, `fsub`, `fadd`,
`fdiv` and `fcmp` for complex multiplication and division, where
classic codegen emits constrained intrinsics. `cir.complex.fmul` and
`cir.complex.fdiv` had no `fenv` attribute, and LoweringPrepare
expanded them with a builder that has no floating-point state.
This gives both operations the optional `fenv` attribute and the fenv
traits of the scalar operations. CIRGen attaches the attribute, and
LoweringPrepare passes it to the scalar arithmetic, comparisons and
conversions of the expansion. The LLVM IR now has the constrained
intrinsics and metadata of classic codegen, with two differences:
- The range check of the improved division keeps its `oge` predicate,
where classic codegen uses `ugt`. It becomes a quiet `cir.fcmp`,
because a `cir.cmp ge` with `fenv` lowers to the signaling `fcmps`
and would raise an invalid exception for a quiet NaN divisor.
- With the promoted range, the conversions to and from the wider type
[5 lines not shown]
NAS-145415 / 28.0.0-BETA.1 / Advertise the TrueNAS API over mDNS as _truenas-api._tcp (#20299)
Advertise the TrueNAS API over mDNS as `_truenas-api._tcp`, on the web
UI's HTTPS port, so that a client such as the TrueNAS Connect app can
find a TrueNAS whatever its host name. Today a TrueNAS advertises its UI
only as `_http._tcp`, named after its host name, and nothing in that
says TrueNAS: the app keeps services whose name starts with "truenas"
and misses a renamed system.
The TXT record holds what the NAS already answers before signing in,
with the `_PLAIN` suffixes trimmed off the authentication mechanisms,
and `txtvers` first (RFC 6763 §6.7). It is 73 bytes:
```
txtvers=1
api=min=v25.10.0,max=v28.0.0
mech=API_KEY,TOKEN,PASSWORD,SCRAM
```
[15 lines not shown]
NAS-145415 / 28.0.0-BETA.1 / Advertise the TrueNAS API over mDNS as _truenas-api._tcp (#20299)
Advertise the TrueNAS API over mDNS as `_truenas-api._tcp`, on the web
UI's HTTPS port, so that a client such as the TrueNAS Connect app can
find a TrueNAS whatever its host name. Today a TrueNAS advertises its UI
only as `_http._tcp`, named after its host name, and nothing in that
says TrueNAS: the app keeps services whose name starts with "truenas"
and misses a renamed system.
The TXT record holds what the NAS already answers before signing in,
with the `_PLAIN` suffixes trimmed off the authentication mechanisms,
and `txtvers` first (RFC 6763 §6.7). It is 73 bytes:
```
txtvers=1
api=min=v25.10.0,max=v28.0.0
mech=API_KEY,TOKEN,PASSWORD,SCRAM
```
[12 lines not shown]
[VPlan] Create BuildVectors before converting replicate regions to lane 0. (#244181)
`dissolveReplicateRegion` queried `onlyFirstLaneUsed` after replacing
each predicated phi with a single-scalar phi. Users such as widened GEPs
treat a single-scalar operand as uniform, so they used lane 0's value
for all lanes.
Create the BuildVectors while the predicated phis still represent all
lanes.
The first commit pre-commits the test, showing the current miscompile.
Disable SMMUv2 on Snapdragon X2 machines for now as it seems to be broken.
We can't reuse sc_is_qcom since that enables extra quirks we only need on
previous Qualcomm SoCs.
ok kettenis@ phessler@
security/py-zkg: Update 3.0.1 => 3.2.0
Changelog:
https://github.com/zeek/package-manager/blob/v3.2.0/CHANGES
Port Changes:
- Drop the py-configparser dependency: zkg imports the standard
library configparser; devel/py-configparser only provides
backports.configparser.
- Raise the GitPython and semantic_version minimums to what 3.2.0
requires (3.1.43, 2.10.0); 3.2.0 requires Python 3.10.
- setup.py now installs the source tree's VERSION file as data_files
into ${PREFIX}/output_dir/, where nothing reads it; patch that out.
- LICENSE is NCSA (COPYING is the University of Illinois/NCSA Open
Source License), not BSD3CLAUSE.
- Switch to USE_PYTHON=pep517 (the package metadata becomes dist-info).
- Add 'make test' support.
PR: 300171
Approved by: Shirkdog <mshirk at daemon-security.com> (maintainer)
security/py-zkg: Update 3.0.1 => 3.2.0
Changelog:
https://github.com/zeek/package-manager/blob/v3.2.0/CHANGES
Port Changes:
- Drop the py-configparser dependency: zkg imports the standard
library configparser; devel/py-configparser only provides
backports.configparser.
- Raise the GitPython and semantic_version minimums to what 3.2.0
requires (3.1.43, 2.10.0); 3.2.0 requires Python 3.10.
- setup.py now installs the source tree's VERSION file as data_files
into ${PREFIX}/output_dir/, where nothing reads it; patch that out.
- LICENSE is NCSA (COPYING is the University of Illinois/NCSA Open
Source License), not BSD3CLAUSE.
- Switch to USE_PYTHON=pep517 (the package metadata becomes dist-info).
- Add 'make test' support.
PR: 300171
Approved by: Shirkdog <mshirk at daemon-security.com> (maintainer)
[MIR2Vec] Precompute the canonical opcode index (#245763)
Opcode lookups no longer run a regex and a linear search
`llc -print-mir2vec` on a large MIR file goes from 27s to 8.5s
Attach smmu(4) to SMMUv3 IORT nodes. SMMUv3 support is already
implemented and works, this makes the code actually reachable in
ACPI mode.
tested by kettenis@ claudio@
ok phessler@ kettenis@