Commit Graph

27333 Commits

Author SHA1 Message Date
Folkert de Vries 244fc326f2 Merge pull request #2026 from folkertdev/neon-vpadd
use `intrinsics::simd` for vpadd
2026-02-18 16:18:15 +00:00
Folkert de Vries 6671f95770 use intrinsics::simd for vpadd 2026-02-18 16:54:47 +01:00
Sayantan Chakraborty 9ce60760aa Merge pull request #2028 from folkertdev/f64-vld
use `read_unaligned` for f64 `vld` and `vldq`
2026-02-18 15:50:38 +00:00
Folkert de Vries 57a1974398 neon ld1 2026-02-18 10:03:31 +01:00
Folkert de Vries caff332902 neon ld4 2026-02-18 10:03:31 +01:00
Folkert de Vries 15e68a188c neon ld3 2026-02-18 10:03:31 +01:00
Folkert de Vries 0168f07955 use intrinsics::simd for aarch64 deinterleaving loads 2026-02-18 10:03:31 +01:00
Folkert de Vries dba288e0bd lock stdout when printing a intrinsic test failure 2026-02-18 10:03:31 +01:00
Folkert de Vries 7a43a6e73d Merge pull request #2029 from folkertdev/interleaving-load-store-roundtrip
test interleaving load/store roundtrip
2026-02-18 08:46:24 +00:00
Sayantan Chakraborty 33a9d03873 Merge pull request #2023 from folkertdev/neon-vmull
use `intrinsics::simd` for `vmull_*`
2026-02-17 22:06:34 +00:00
Folkert de Vries 061b5225f4 fix interleaving read/write not roundtripping on aarch64_be 2026-02-17 19:46:49 +01:00
Folkert de Vries 72adcde31d test interleaving load/store roundtrip 2026-02-17 17:22:33 +01:00
Folkert de Vries f3ff080c68 use read_unaligned for f64 vld and vldq 2026-02-17 11:34:02 +01:00
Folkert de Vries 7ce33416af use intrinsics::simd for vmull_* 2026-02-17 00:58:11 +01:00
The rustc-josh-sync Cronjob Bot 6bbe5cc783 Merge ref '139651428df8' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@139651428d
Filtered ref: rust-lang/stdarch@b1e0e474e1
Upstream diff: https://github.com/rust-lang/rust/compare/db3e99bbab28c6ca778b13222becdea54533d908...139651428df86cf88443295542c12ea617cbb587

This merge was created using https://github.com/rust-lang/josh-sync.
2026-02-16 04:50:28 +00:00
The rustc-josh-sync Cronjob Bot 73cb0682f5 Prepare for merging from rust-lang/rust
This updates the rust-version file to 139651428d.
2026-02-16 04:48:11 +00:00
Folkert de Vries 022d24b34c Merge pull request #1999 from androm3da/main
arch: Add Hexagon HVX instructions
2026-02-15 19:01:37 +00:00
Brian Cain 76c041c19a stdarch-gen-hexagon: Fix formatting 2026-02-15 12:18:19 -06:00
Brian Cain f5161526e6 core_arch: Add tracking issue to hexagon module declaration
Update the unstable attribute for the hexagon module to use the
proper tracking issue number (151523) instead of "none".
2026-02-15 12:13:00 -06:00
Brian Cain 0e08703130 stdarch-gen-hexagon: Use checked-in header file instead of downloading
Check in the LLVM HVX header file (hvx_hexagon_protos.h) from LLVM
22.1.0-rc1 and modify the generator to read from this local copy
instead of downloading it at runtime. This removes the ureq dependency
and makes the build more reproducible.
2026-02-15 11:58:03 -06:00
bors 2219766af6 Auto merge of #152605 - scottmcm:box-drop-alignment, r=Mark-Simulacrum
Pass alignments through the shim as `Alignment` (not `usize`)

We're using `Layout` on both sides, so might as well skip the transmutes back and forth to `usize`.

The mir-opt test shows that doing so allows simplifying the boxed-slice drop slightly, for example.
2026-02-15 13:38:45 +00:00
Brian Cain d6b2cb08a8 examples: Make gaussian build on all targets
Restructure gaussian.rs to follow the pattern used by hex.rs and
connect5.rs.

Remove the 'hexagon' feature gate.
2026-02-15 07:10:55 -06:00
Brian Cain be9dc99118 examples: Use HvxVectorPair for precise Gaussian blur arithmetic
Update the Gaussian 3x3 blur example to use HvxVectorPair widening
operations. This demonstrates that HvxVectorPair intrinsics now work
 correctly with the updated nightly.

- Add #![cfg(target_arch = "hexagon")] crate-level gate
2026-02-15 07:01:00 -06:00
Amanieu d'Antras fcc7e72a46 Merge pull request #2024 from folkertdev/arm-shift-right-and-insert
use `intrinsics::simd` for 'shift right and insert'
2026-02-15 07:18:32 +00:00
Jacob Pratt 5d2a033b85 Rollup merge of #152472 - lizan:wasm, r=Mark-Simulacrum
unwind/wasm: fix compile error by wrapping wasm_throw in unsafe block

This fix rust-std compile error on wasm32-unknown-unknown with panic=unwind because of `#![deny(unsafe_op_in_unsafe_fn)]`
2026-02-14 23:17:41 -05:00
Jacob Pratt ef776c603c Rollup merge of #152188 - cuviper:placeholder-stdarch, r=Mark-Simulacrum
Include `library/stdarch` for `CURRENT_RUSTC_VERSION` updates

Our tool `replace-version-placeholder` uses the `tidy` file walker and its
directory filter, but that skips `library/stdarch` which we do need for public
stability markers. This PR adds a local filter function that explicitly allows
that path.

The commit for 1.94 `stdarch` updates is coming from beta rust-lang/rust#152187.
2026-02-14 23:17:40 -05:00
Jacob Pratt 3ce7fb6607 Rollup merge of #152534 - PaulDance:patches/remove-win7-uds, r=Mark-Simulacrum
Test(lib/win/net): Skip UDS tests when under Win7

Unix Domain Socket support has only been added to Windows since Windows 10 Insider Preview Build 17063. Thus, it has no chance of ever being supported under Windows 7, making current tests fail. This therefore adds the necessary in order to make the tests dynamically skip when run under Windows 7, 8, and early 10, as it does not trigger linker errors.

cc rust-lang/rust#150487 @roblabla

@rustbot label T-libs A-io O-windows-7
2026-02-14 23:17:32 -05:00
Jacob Pratt 8075b89aa6 Rollup merge of #152508 - arferreira:improve-write-macro-diagnostic, r=Mark-Simulacrum
Improve write! and writeln! error when called without destination

Fixes rust-lang/rust#152493

Adds catch-all arms to `write!` and `writeln!` macros so that calling them without a destination (e.g., `write!("S")` instead of `write!(f, "S")`) gives a clear error instead of the cryptic "unexpected end of macro invocation" pointing at macro internals.

r? @estebank
2026-02-14 23:17:31 -05:00
Jacob Pratt f065c9dab1 Rollup merge of #152132 - folkertdev:carryless-mul, r=Mark-Simulacrum
implement `carryless_mul`

tracking issue: https://github.com/rust-lang/rust/issues/152080
ACP: https://github.com/rust-lang/libs-team/issues/738

This defers to LLVM's `llvm.clmul` when available, and otherwise falls back to a method from the `polyval` crate ([link](https://github.com/RustCrypto/universal-hashes/blob/master/polyval/src/field_element/soft/soft64.rs)).

Some things are missing, which I think we can defer:

- the ACP has some discussion about additional methods, but I'm not sure exactly what is wanted or how to implement it efficiently
- the SIMD intrinsic is not yet `const` (I think I ran into a bootstrapping issue). That is fine for now, I think in `stdarch` we can't really use this intrinsic at the moment, we'd only want the scalar version to replace some riscv intrinsics.
- the SIMD intrinsic is not implemented for the gcc and cranelift backends. That should be reasonably straightforward once we have a const eval implementation though.
2026-02-14 23:17:31 -05:00
Jonathan Brouwer 96066cb5b5 Rollup merge of #143575 - GrigorenkoPV:unused_lifetimes, r=Mark-Simulacrum
Remove named lifetimes in some `PartialOrd` & `PartialEq` `impl`s

Makes [the docs](https://doc.rust-lang.org/1.88.0/std/cmp/trait.PartialOrd.html#impl-PartialOrd%3CPathBuf%3E-for-Cow%3C'a,+Path%3E) way easier to look at, gets rid of a few `#[allow(unused_lifetimes)]`, and AFAICT is completely equivalent.
2026-02-14 22:11:54 +01:00
Jonathan Brouwer 16da3ab2ea Rollup merge of #152381 - oli-obk:non_static_reflection, r=Mark-Simulacrum
Do not require `'static` for obtaining reflection information.

tracking issue rust-lang/rust#142577

This does not affect the stable `TypeId::of`, as that has its own `'static` bound.

But it will allow obtaining `TypeId`s for non-static types via the reflection API. To obtain such a `TypeId` for any type, just use `Type::of::<(T,)>().kind` to extract the first field of a tuple.

This effectively reintroduces rust-lang/rust#41875, which @rust-lang/lang decided against allowing back in 2018 due to lack of sound use cases. We will thus need to have a T-lang meeting specifically about `TypeId` for non-static types before *stabilizing* any part of reflection (in addition to T-lang meetings about reflection in general). I'm adding an explicit point about this to the tracking issue.

cc @scottmcm @joshtriplett @9SonSteroids @SpriteOvO @izagawd @BD103
2026-02-14 22:11:53 +01:00
Jonathan Brouwer 33c2a6eba9 Rollup merge of #151365 - RalfJung:unsafe-unpin-opsem, r=BoxyUwU
UnsafePinned: implement opsem effects of UnsafeUnpin

This implements the next step for https://github.com/rust-lang/rust/issues/125735: actually making `UnsafePinned` have special opsem effects by suppressing the `noalias` *even if* the type is wrapped in an `Unpin` wrapper.

For backwards compatibility we also still keep the `Unpin` hack, i.e. a type must be both `Unpin` and `UnsafeUnpin` to get `noalias`.
2026-02-14 22:11:53 +01:00
Jonathan Brouwer 6d625cc074 Rollup merge of #145024 - Kmeakin:km/optimize-slice-index/v3, r=Mark-Simulacrum
Optimize indexing slices and strs with inclusive ranges

Instead of separately checking for `end == usize::MAX` and `end + 1 > slice.len()`, we can check for `end >= slice.len()`. Also consolidate all the str indexing related panic functions into a single function which reports the correct error depending on the arguments, as the slice indexing code already does.

The downside of all this is that the panic message is slightly less specific when trying to index with `[..=usize::MAX]`: instead of saying "attempted to index str up to maximum usize" it just says "end byte index {end} out of bounds". But this is a rare enough case that I think it is acceptable
2026-02-14 22:11:52 +01:00
Folkert de Vries b935f379b4 implement carryless_mul 2026-02-14 21:23:30 +01:00
Folkert de Vries 6a12103dda use intrinsics::simd for 'shift right and insert' 2026-02-14 20:28:29 +01:00
Jonathan Brouwer 8a03b5f3ec Rollup merge of #152531 - cyrgani:pm-yet-another-cleanup, r=petrochenkov
`proc_macro::bridge`: simplify `ExecutionStrategy` and `DispatcherTrait`

Also includes another tiny cleanup (functions can only have one return type).
2026-02-14 18:55:36 +01:00
Jonathan Brouwer 6213acdbb8 Rollup merge of #152618 - folkertdev:stdarch-sync-2026-02-14, r=folkertdev
stdarch subtree update

Subtree update of `stdarch` to https://github.com/rust-lang/stdarch/commit/1239a9f83a501a33efc0f5e56b28c31cdb31a28f.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-02-14 18:55:34 +01:00
Amanieu d'Antras b96ea54109 Merge pull request #2017 from heiher/loong64-sync
loongarch: Sync SIMD intrinsics with C
2026-02-14 15:15:02 +00:00
Scott McMurray 774268afc1 Pass alignments through the shim as Alignment (not usize)
We're using `Layout` on both sides, so might as well skip the transmutes back and forth to `usize`.

The mir-opt test shows that doing so allows simplifying the boxed-slice drop slightly, for example.
2026-02-14 01:39:16 -08:00
Paul Mabileau c22301b099 Test(lib/win/net): Skip UDS tests when under Win7
Unix Domain Socket support has only been added to Windows since Windows
10 Insider Preview Build 17063. Thus, it has no chance of ever being
supported under Windows 7, making current tests fail. This therefore
adds the necessary in order to make the tests dynamically skip when run
under Windows 7, 8, and early 10, as it does not trigger linker errors.

Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
2026-02-14 01:28:50 +01:00
Pavel Grigorenko cd314dead1 Remove named lifetimes in some PartialOrd & PartialEq impls 2026-02-14 00:13:46 +03:00
Jonathan Brouwer 65d982abd8 Rollup merge of #152469 - mu001999-contrib:cleanup/unused-features, r=nadrieril,jdonszelmann
Remove unused features

Detected by https://github.com/rust-lang/rust/pull/152164.

~~Only allow `unused_features` if there are complex platform-specific features enabled.~~
2026-02-13 13:34:58 +01:00
cyrgani f601b29825 inline SameThread and CrossThread 2026-02-13 11:24:50 +00:00
cyrgani 31053484a7 replace MessagePipe trait with its impl 2026-02-13 11:23:26 +00:00
Stuart Cook eaa6766793 Rollup merge of #152232 - chenyukang:add-must-use-for-filetimes, r=Mark-Simulacrum
Add must_use for FileTimes

Fixes rust-lang/rust#152231
2026-02-13 15:19:11 +11:00
mu001999 73c42c1800 Remove or allow unused features in library doc and tests 2026-02-13 09:27:16 +08:00
mu001999 0dc1556968 Remove unused features in library 2026-02-13 09:25:50 +08:00
Brian Cain 5b7ab682b4 examples: Simplify gaussian.rs with cfg gate
Add `#![cfg(target_arch = "hexagon")]`

- Remove redundant #[cfg(target_arch = "hexagon")] from functions
- Simplify import and constant cfg conditions
- Remove non-Hexagon test code branch from main()
2026-02-12 11:41:57 -06:00
Brian Cain 7df6e6799f Update Cargo.lock
Updates cc crate to 1.2.55 which fixes macabi target triple
handling for x86_64-apple-ios-macabi builds.
2026-02-12 10:41:53 -06:00
Brian Cain d2ce1c9c3d stdarch-gen-hexagon: Fix clippy warnings
- Move regex compilations outside loops
- Use Option::map and or_else instead of manual if-let chains
- Use strip_prefix instead of manual starts_with + slice
- Use !is_empty() instead of len() >= 1
- Combine consecutive str::replace calls
2026-02-12 09:34:06 -06:00