Skip to content
/ rust Public
forked from rust-lang/rust

Commit 6bc6675

Browse files
authored
Rollup merge of rust-lang#158497 - folkertdev:stdarch-sync-2026-06-27, r=folkertdev
stdarch subtree update Subtree update of `stdarch` to rust-lang/stdarch@62d5595. Created using https://github.com/rust-lang/josh-sync. r? @ghost
2 parents 13f1859 + 3515461 commit 6bc6675

94 files changed

Lines changed: 1903 additions & 933 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

compiler/rustc_codegen_cranelift/src/intrinsics/llvm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub(crate) fn codegen_llvm_intrinsic_call<'tcx>(
1919
}
2020

2121
match intrinsic {
22-
"llvm.prefetch" => {
22+
"llvm.prefetch.p0" => {
2323
// Nothing to do. This is merely a perf hint.
2424
}
2525

compiler/rustc_codegen_gcc/src/intrinsic/llvm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function
10441044
#[cfg(feature = "master")]
10451045
pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function<'gcc> {
10461046
let gcc_name = match name {
1047-
"llvm.prefetch" => {
1047+
"llvm.prefetch.p0" => {
10481048
let gcc_name = "__builtin_prefetch";
10491049
let func = cx.context.get_builtin_function(gcc_name);
10501050
cx.functions.borrow_mut().insert(gcc_name.to_string(), func);

compiler/rustc_codegen_llvm/src/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
412412
let ptr = args[0].immediate();
413413
let locality = fn_args.const_at(1).to_leaf().to_i32();
414414
self.call_intrinsic(
415-
"llvm.prefetch",
415+
"llvm.prefetch.p0",
416416
&[self.val_ty(ptr)],
417417
&[
418418
ptr,

library/stdarch/.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ jobs:
337337
cargo run --bin=stdarch-gen-loongarch --release -- crates/stdarch-gen-loongarch/lasx.spec
338338
git diff --exit-code
339339
- name: Check hexagon
340+
env:
341+
STDARCH_GEN_MODE: check
340342
run: |
341343
cargo run -p stdarch-gen-hexagon --release
342344
git diff --exit-code

library/stdarch/Cargo.lock

Lines changed: 87 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,22 @@ version = "1.0.2"
268268
source = "registry+https://github.com/rust-lang/crates.io-index"
269269
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
270270

271+
[[package]]
272+
name = "errno"
273+
version = "0.3.14"
274+
source = "registry+https://github.com/rust-lang/crates.io-index"
275+
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
276+
dependencies = [
277+
"libc",
278+
"windows-sys",
279+
]
280+
281+
[[package]]
282+
name = "fastrand"
283+
version = "2.4.1"
284+
source = "registry+https://github.com/rust-lang/crates.io-index"
285+
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
286+
271287
[[package]]
272288
name = "find-msvc-tools"
273289
version = "0.1.9"
@@ -282,13 +298,14 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
282298

283299
[[package]]
284300
name = "getrandom"
285-
version = "0.2.17"
301+
version = "0.3.4"
286302
source = "registry+https://github.com/rust-lang/crates.io-index"
287-
checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
303+
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
288304
dependencies = [
289305
"cfg-if",
290306
"libc",
291-
"wasi",
307+
"r-efi 5.3.0",
308+
"wasip2",
292309
]
293310

294311
[[package]]
@@ -299,7 +316,7 @@ checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
299316
dependencies = [
300317
"cfg-if",
301318
"libc",
302-
"r-efi",
319+
"r-efi 6.0.0",
303320
"rand_core 0.10.0",
304321
"wasip2",
305322
"wasip3",
@@ -445,6 +462,12 @@ version = "0.5.6"
445462
source = "registry+https://github.com/rust-lang/crates.io-index"
446463
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
447464

465+
[[package]]
466+
name = "linux-raw-sys"
467+
version = "0.12.1"
468+
source = "registry+https://github.com/rust-lang/crates.io-index"
469+
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
470+
448471
[[package]]
449472
name = "log"
450473
version = "0.4.29"
@@ -457,6 +480,12 @@ version = "2.8.0"
457480
source = "registry+https://github.com/rust-lang/crates.io-index"
458481
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
459482

483+
[[package]]
484+
name = "once_cell"
485+
version = "1.21.4"
486+
source = "registry+https://github.com/rust-lang/crates.io-index"
487+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
488+
460489
[[package]]
461490
name = "once_cell_polyfill"
462491
version = "1.70.2"
@@ -529,7 +558,7 @@ checksum = "95c589f335db0f6aaa168a7cd27b1fc6920f5e1470c804f814d9cd6e62a0f70b"
529558
dependencies = [
530559
"env_logger 0.11.10",
531560
"log",
532-
"rand 0.10.0",
561+
"rand 0.10.1",
533562
]
534563

535564
[[package]]
@@ -541,6 +570,12 @@ dependencies = [
541570
"proc-macro2",
542571
]
543572

573+
[[package]]
574+
name = "r-efi"
575+
version = "5.3.0"
576+
source = "registry+https://github.com/rust-lang/crates.io-index"
577+
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
578+
544579
[[package]]
545580
name = "r-efi"
546581
version = "6.0.0"
@@ -549,42 +584,41 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
549584

550585
[[package]]
551586
name = "rand"
552-
version = "0.8.5"
587+
version = "0.9.4"
553588
source = "registry+https://github.com/rust-lang/crates.io-index"
554-
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
589+
checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea"
555590
dependencies = [
556-
"libc",
557591
"rand_chacha",
558-
"rand_core 0.6.4",
592+
"rand_core 0.9.5",
559593
]
560594

561595
[[package]]
562596
name = "rand"
563-
version = "0.10.0"
597+
version = "0.10.1"
564598
source = "registry+https://github.com/rust-lang/crates.io-index"
565-
checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8"
599+
checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207"
566600
dependencies = [
567601
"getrandom 0.4.2",
568602
"rand_core 0.10.0",
569603
]
570604

571605
[[package]]
572606
name = "rand_chacha"
573-
version = "0.3.1"
607+
version = "0.9.0"
574608
source = "registry+https://github.com/rust-lang/crates.io-index"
575-
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
609+
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
576610
dependencies = [
577611
"ppv-lite86",
578-
"rand_core 0.6.4",
612+
"rand_core 0.9.5",
579613
]
580614

581615
[[package]]
582616
name = "rand_core"
583-
version = "0.6.4"
617+
version = "0.9.5"
584618
source = "registry+https://github.com/rust-lang/crates.io-index"
585-
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
619+
checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
586620
dependencies = [
587-
"getrandom 0.2.17",
621+
"getrandom 0.3.4",
588622
]
589623

590624
[[package]]
@@ -648,6 +682,19 @@ version = "0.1.27"
648682
source = "registry+https://github.com/rust-lang/crates.io-index"
649683
checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d"
650684

685+
[[package]]
686+
name = "rustix"
687+
version = "1.1.4"
688+
source = "registry+https://github.com/rust-lang/crates.io-index"
689+
checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
690+
dependencies = [
691+
"bitflags",
692+
"errno",
693+
"libc",
694+
"linux-raw-sys",
695+
"windows-sys",
696+
]
697+
651698
[[package]]
652699
name = "ryu"
653700
version = "1.0.23"
@@ -787,11 +834,19 @@ dependencies = [
787834
"walkdir",
788835
]
789836

837+
[[package]]
838+
name = "stdarch-gen-common"
839+
version = "0.1.0"
840+
dependencies = [
841+
"tempfile",
842+
]
843+
790844
[[package]]
791845
name = "stdarch-gen-hexagon"
792846
version = "0.1.0"
793847
dependencies = [
794848
"regex",
849+
"stdarch-gen-common",
795850
]
796851

797852
[[package]]
@@ -805,7 +860,7 @@ dependencies = [
805860
name = "stdarch-gen-loongarch"
806861
version = "0.1.0"
807862
dependencies = [
808-
"rand 0.8.5",
863+
"rand 0.9.4",
809864
]
810865

811866
[[package]]
@@ -838,7 +893,7 @@ version = "0.0.0"
838893
dependencies = [
839894
"core_arch",
840895
"quickcheck",
841-
"rand 0.8.5",
896+
"rand 0.9.4",
842897
]
843898

844899
[[package]]
@@ -864,6 +919,19 @@ version = "0.6.18"
864919
source = "registry+https://github.com/rust-lang/crates.io-index"
865920
checksum = "43d0e35dc7d73976a53c7e6d7d177ef804a0c0ee774ec77bcc520c2216fd7cbe"
866921

922+
[[package]]
923+
name = "tempfile"
924+
version = "3.27.0"
925+
source = "registry+https://github.com/rust-lang/crates.io-index"
926+
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
927+
dependencies = [
928+
"fastrand",
929+
"getrandom 0.4.2",
930+
"once_cell",
931+
"rustix",
932+
"windows-sys",
933+
]
934+
867935
[[package]]
868936
name = "termcolor"
869937
version = "1.4.1"
@@ -921,12 +989,6 @@ dependencies = [
921989
"winapi-util",
922990
]
923991

924-
[[package]]
925-
name = "wasi"
926-
version = "0.11.1+wasi-snapshot-preview1"
927-
source = "registry+https://github.com/rust-lang/crates.io-index"
928-
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
929-
930992
[[package]]
931993
name = "wasip2"
932994
version = "1.0.2+wasi-0.2.9"

library/stdarch/ci/intrinsic-test.sh

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
#!/usr/bin/env sh
22

3-
set -ex
4-
53
if [ $# -lt 2 ]; then
6-
>&2 echo "Usage: $0 <TARGET> <CC>"
4+
>&2 echo "Usage: $0 <TARGET> <CC> <..args for \`cargo test\`..>"
75
exit 1
86
fi
97

10-
case ${2} in
8+
set -ex
9+
10+
# Pop both arguments and leave "$@" as containing args to be forwarded to `cargo test`
11+
TARGET="$1"
12+
shift
13+
CC_KIND="$1"
14+
shift
15+
16+
case ${CC_KIND} in
1117
clang)
1218
export CC="${CLANG_PATH}"
1319
CC_ARG_STYLE=clang
@@ -22,7 +28,7 @@ case ${2} in
2228
CC_ARG_STYLE=clang
2329
;;
2430
*)
25-
>&2 echo "Unknown compiler: ${2}"
31+
>&2 echo "Unknown compiler: ${CC_KIND}"
2632
exit 1
2733
;;
2834
esac
@@ -35,7 +41,7 @@ echo "PROFILE=${PROFILE}"
3541

3642
INTRINSIC_TEST="--manifest-path=crates/intrinsic-test/Cargo.toml"
3743

38-
case ${1} in
44+
case ${TARGET} in
3945
aarch64_be*)
4046
export CFLAGS="-I${AARCH64_BE_TOOLCHAIN}/aarch64_be-none-linux-gnu/libc/usr/include --sysroot={AARCH64_BE_TOOLCHAIN}/aarch64_be-none-linux-gnu/libc -Wno-nonportable-vector-initialization"
4147
ARCH=aarch64_be
@@ -60,24 +66,25 @@ case ${1} in
6066

6167
esac
6268

63-
case "${1}" in
69+
case "${TARGET}" in
6470
x86_64-unknown-linux-gnu*)
6571
env -u CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER \
6672
cargo run "${INTRINSIC_TEST}" --release \
6773
--bin intrinsic-test -- intrinsics_data/x86-intel.xml \
6874
--skip "crates/intrinsic-test/missing_${ARCH}_common.txt" \
69-
--skip "crates/intrinsic-test/missing_${ARCH}_${2}.txt" \
70-
--target "${1}" \
75+
--skip "crates/intrinsic-test/missing_${ARCH}_${CC_KIND}.txt" \
76+
--target "${TARGET}" \
7177
--cc-arg-style "${CC_ARG_STYLE}"
7278
;;
7379
*)
7480
cargo run "${INTRINSIC_TEST}" --release \
7581
--bin intrinsic-test -- intrinsics_data/arm_intrinsics.json \
7682
--skip "crates/intrinsic-test/missing_${ARCH}_common.txt" \
77-
--skip "crates/intrinsic-test/missing_${ARCH}_${2}.txt" \
78-
--target "${1}" \
83+
--skip "crates/intrinsic-test/missing_${ARCH}_${CC_KIND}.txt" \
84+
--target "${TARGET}" \
7985
--cc-arg-style "${CC_ARG_STYLE}"
8086
;;
8187
esac
8288

83-
cargo test --manifest-path=rust_programs/Cargo.toml --target "${1}" --profile "${PROFILE}" --tests
89+
cargo test --manifest-path=rust_programs/Cargo.toml --target "${TARGET}" --profile "${PROFILE}" \
90+
--tests "$@"

library/stdarch/crates/core_arch/src/aarch64/neon/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11903,7 +11903,7 @@ pub unsafe fn vluti4q_lane_s8<const LANE: i32>(a: int8x16_t, b: uint8x8_t) -> in
1190311903
unsafe extern "unadjusted" {
1190411904
#[cfg_attr(
1190511905
any(target_arch = "aarch64", target_arch = "arm64ec"),
11906-
link_name = "llvm.aarch64.neon.vluti4q.lane.v8i8"
11906+
link_name = "llvm.aarch64.neon.vluti4q.lane.v16i8"
1190711907
)]
1190811908
fn _vluti4q_lane_s8(a: int8x16_t, b: uint8x8_t, n: i32) -> int8x16_t;
1190911909
}

library/stdarch/crates/core_arch/src/aarch64/prefetch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
use stdarch_test::assert_instr;
33

44
unsafe extern "unadjusted" {
5-
#[link_name = "llvm.prefetch"]
5+
#[link_name = "llvm.prefetch.p0"]
66
fn prefetch(p: *const i8, rw: i32, loc: i32, ty: i32);
77
}
88

0 commit comments

Comments
 (0)