[AMDGPU] Apply target flag specifier when lowering MO_ExternalSymbol operands (#202389)
The MO_ExternalSymbol case in AMDGPUMCInstLower dropped the operand
target flags emitting the wrong relocation type
hym8563: Fix 32-bit powerpc build
Depend on clknode_if.h in the module Makefile, so that it gets
explicitly built for the module. Also, reduce the #if guards to only
the new clock output code, and gate them on all powerpc, not just
powerpc64.
Fixes: 6b77d34f("HYM8563: Add support for clock output.")
Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D57795
rge: Fix 32-bit powerpc build
Book-E powerpc has 64-bit bus_addr_t but only a 32-bit bus_size_t. Use
the right macros for maxsize and maxsegsize to fix the build.
Fixes: 4bf8ce037 ("if_rge: initial import of if_rge driver from OpenBSD.")
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D57794
[Clang][Modules] Skip anonymous declaration numbering for local tags in dependent contexts (#202248)
Local tag declarations (classes, structs, enums, and lambdas) defined
within function template bodies or class templates do not require ODR
merging at the local declaration level across different modules. ODR
consistency is already guaranteed because the instantiator only walks
the canonical template definition body, which instantiates its own copy
of the local class.
Merging them across different modules causes their member definitions
(like methods or call operators) to be canonicalized to one module,
while the instantiator walks the template body from another module.
Since local variables within template bodies are not merged, this
mismatch leads to assertion crashes during template instantiation in
`LocalInstantiationScope::findInstantiationOf`.
Fixes https://github.com/llvm/llvm-project/issues/206203.
Co-authored-by: ipopov <ipopov at google.com>
[X86] Verify inline-asm register operands against the subtarget
Inline asm can name physical registers that require a subtarget feature
the selected subtarget lacks: zmm and mask (k) registers need AVX-512,
ymm registers need AVX. The subtarget is derived from the function's
target-cpu/target-features, so no MachineFunction is required.
Fix Windows Path Separator issues in create_symlink and readlink (#206665)
- Force create_symlink target path to use backslashes on Windows, as
NTFS reparse points require backslashes.
- Normalize readlink output to native path separators to match preferred
style.
This fixes the following test failure:
```
PS C:\src\chromium\src\third_party\llvm> .\build_repro\unittests\Support\SupportTests.exe --gtest_filter=FileSystemTest.CreateRelativeDirectorySymlink
[ RUN ] FileSystemTest.CreateRelativeDirectorySymlink
Test Directory: C:/src/temp/file-system-test-a3fd42
C:\src\chromium\src\third_party\llvm\llvm\unittests\Support\Path.cpp(896): error: Value of: fs::is_directory(Link) Actual: false
Expected: true
```
[AsmMatcher] Report a near-miss when all candidates mismatch multiple operands (#206390)
In the ReportMultipleNearMisses path, an opcode that mismatches more
than one operand is dropped, and its first near-miss is dropped with it. If
every opcode is dropped this way, the parser only reports a generic
"invalid instruction".
Now keep the first near-miss of each such opcode, and use it only when
no other opcode gives a near-miss.
Assisted-by: claude-opus
[TargetParser][NFC] Make FeatureBitset iterable (#206394)
FeatureBitset had no way to iterate its bits, so callers scanned all
MAX_SUBTARGET_FEATURES positions by hand.
This adds begin()/end() that yield the index of each set bit, skipping
unset bits with countr_zero.
Callers can now write `for (unsigned Feature: Features)`.
Assisted-by: claude-opus
[lldb][test] Skip more unsupported tests on WebAssembly (#206857)
These tests exercise functionality that WebAssembly does not provide, so
they cannot pass under the Wasm test configuration. The reasons vary by
test, captured by a short inline comment.
Skip them with @skipIfWasm (and @skipIfNoSignals for the SIGINT test) so
the suite reflects real failures.
[clang][llvm]Uncorrelate CFI and Callgraph related type metadata annotations (#204266)
When -fexperimental-call-graph-section flag is set, it adds type
metadata to all the functions whose addresses are taken and does not
have local linkage. When this flag is set along with CFI, the type
metadata is added to all the vtable functions including destructors.
This changes which functions are to be treated as CFI functions and
includes such vtable entries to become part of the CFI check jumptables.
To disambiguate intentions of CFI and callgraph mechanisms, this patch
renames metadata set by callgraph mechanism to !callgraph
(MD_callgraph). This prevents inflating the list of CFI functions when
callgraph section is enabled along with CFI.
Reland: [LoongArch] Custom scalar UINT_TO_FP and FP_TO_UINT with LSX instructions (#206655)
Using `vftintrz.lu.d` for converting scalar double/float values to
unsigned 64-bit integers, and `vffint.d.lu` vice versa.
Remove incorrect uint64 to float conversion, which is suffered
from double-rounding issue.
[LoongArch] Support ISD::SET_ROUNDING (llvm.set.rounding) (#206395)
Fix https://github.com/llvm/llvm-project/issues/205039.
The LoongArch FCSR RM field supports four rounding modes, whose
encodings differ from LLVM's rounding mode values:
FCSR: 0=RNE, 1=RZ, 2=RP, 3=RM
LLVM: 0=RTZ, 1=RNE, 2=RUP, 3=RDN
For LLVM rounding mode 4, round to nearest with ties away from zero,
diagnose an error when it is a constant.
---------
Co-authored-by: tangyuan0821 <tangyuan0821 at email.cn>
ktls: Add a tunable to disable TLS receive
TLS receive offload is really only beneficial for in-kernel use cases
(such as NFS over TLS) or when using a hardware offload. In addition,
several recent SAs have involved the TLS receive path, but the only
current mitigation for those is to disable TLS offload entirely.
Reviewed by: ziaee, gallatin, markj
Relnotes: yes
Sponsored by: Netflix
Sponsored by: Chelsio Communications
Co-authored-by: John Baldwin <jhb at FreeBSD.org>
Differential Revision: https://reviews.freebsd.org/D57974
ktls: Centralize the check for CBC ciphers
Move the check out of ktls_enable_(rx|tx) and into ktls_create_session.
Reviewed by: gallatin, markj
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D57973
Tighten up the introduction a little:
Mention Match as a conditional directive (previously it only
mentioned Host)
Try to use consistent language in the introduction to refer to
configuration directives (previously it used "parameters" and
"keywords" interchangeably).
Mention that comments may appear at the end of the line too, and that
whitespace at the beginning/end of lines is not significant.