Skip to content

Commit c1ce926

Browse files
Rollup merge of #163218 - folkertdev:stdarch-sync-2026-09-23, r=folkertdev
stdarch subtree update Fixes rust-lang/stdarch#2232 Subtree update of `stdarch` to rust-lang/stdarch@cdcca32. Created using https://github.com/rust-lang/josh-sync. r? @ghost
2 parents ad2e756 + 4282aee commit c1ce926

48 files changed

Lines changed: 1910 additions & 687 deletions

Some content is hidden

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

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

Lines changed: 270 additions & 270 deletions
Large diffs are not rendered by default.

‎library/stdarch/Cargo.lock‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ version = "2.11.0"
8888
source = "registry+https://github.com/rust-lang/crates.io-index"
8989
checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
9090

91+
[[package]]
92+
name = "bstr"
93+
version = "1.13.1"
94+
source = "registry+https://github.com/rust-lang/crates.io-index"
95+
checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f"
96+
dependencies = [
97+
"memchr",
98+
"serde_core",
99+
]
100+
91101
[[package]]
92102
name = "cc"
93103
version = "1.2.59"
@@ -800,10 +810,20 @@ dependencies = [
800810
"syn",
801811
]
802812

813+
[[package]]
814+
name = "similar"
815+
version = "3.2.0"
816+
source = "registry+https://github.com/rust-lang/crates.io-index"
817+
checksum = "4f66ca1f7aca2474dc10c942eb22feffc897735f54cd1db90138c2fddb490987"
818+
dependencies = [
819+
"bstr",
820+
]
821+
803822
[[package]]
804823
name = "stdarch-gen-arm"
805824
version = "0.1.0"
806825
dependencies = [
826+
"clap",
807827
"itertools",
808828
"proc-macro2",
809829
"quote",
@@ -819,13 +839,15 @@ dependencies = [
819839
name = "stdarch-gen-common"
820840
version = "0.1.0"
821841
dependencies = [
842+
"similar",
822843
"tempfile",
823844
]
824845

825846
[[package]]
826847
name = "stdarch-gen-hexagon"
827848
version = "0.1.0"
828849
dependencies = [
850+
"clap",
829851
"regex",
830852
"stdarch-gen-common",
831853
]
@@ -834,6 +856,7 @@ dependencies = [
834856
name = "stdarch-gen-loongarch"
835857
version = "0.1.0"
836858
dependencies = [
859+
"clap",
837860
"rand 0.9.4",
838861
"stdarch-gen-common",
839862
]

‎library/stdarch/ci/docker/loongarch64-unknown-linux-gnu/Dockerfile‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@ FROM ubuntu:25.10
33
RUN apt-get update && \
44
apt-get install -y --no-install-recommends \
55
gcc libc6-dev qemu-user ca-certificates \
6-
gcc-loongarch64-linux-gnu libc6-dev-loong64-cross
6+
gcc-loongarch64-linux-gnu libc6-dev-loong64-cross \
7+
wget
78

9+
RUN wget https://ci-mirrors.rust-lang.org/llvm/llvm-22.1.4-x86_64.tar.gz -O llvm.tar.xz
10+
RUN mkdir llvm
11+
RUN tar -xvf llvm.tar.xz --strip-components=1 -C llvm
12+
13+
ENV CLANG_PATH="/llvm/bin/clang"
14+
ENV GCC_PATH=loongarch64-linux-gnu-gcc
815

916
ENV CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_LINKER=loongarch64-linux-gnu-gcc \
1017
CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_RUNNER="qemu-loongarch64 -cpu max -L /usr/loongarch64-linux-gnu" \

‎library/stdarch/ci/intrinsic-test.sh‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ case ${TARGET} in
6565
ARCH=x86
6666
RUNTIME_RUSTFLAGS=
6767
;;
68+
69+
loongarch64*)
70+
export CFLAGS="-I/usr/loongarch64-linux-gnu/include/"
71+
ARCH=loongarch64
72+
RUNTIME_RUSTFLAGS=-Ctarget-feature=+lsx,+lasx,+frecipe
73+
;;
6874
*)
6975
;;
7076

@@ -80,6 +86,14 @@ case "${TARGET}" in
8086
--target "${TARGET}" \
8187
--cc-arg-style "${CC_ARG_STYLE}"
8288
;;
89+
loongarch64*)
90+
cargo run "${INTRINSIC_TEST}" --release \
91+
--bin intrinsic-test -- crates/stdarch-gen-loongarch \
92+
--skip "crates/intrinsic-test/missing_${ARCH}_common.txt" \
93+
--skip "crates/intrinsic-test/missing_${ARCH}_${CC_KIND}.txt" \
94+
--target "${TARGET}" \
95+
--cc-arg-style "${CC_ARG_STYLE}"
96+
;;
8397
*)
8498
cargo run "${INTRINSIC_TEST}" --release \
8599
--bin intrinsic-test -- intrinsics_data/arm_intrinsics.json \

‎library/stdarch/crates/core_arch/Cargo.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ stdarch-test = { version = "0.*", path = "../stdarch-test" }
2424
[target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.dev-dependencies]
2525
syscalls = { version = "0.6.18", default-features = false }
2626

27+
[lints.rust]
28+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_has_reliable_f16)'] }
29+
2730
[lints.clippy]
2831
too_long_first_doc_paragraph = "allow"
2932
missing_transmute_annotations = "allow"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25081,7 +25081,7 @@ pub unsafe fn vst1q_f64_x4(a: *mut f64, b: float64x2x4_t) {
2508125081
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2508225082
pub unsafe fn vst1_lane_f64<const LANE: i32>(a: *mut f64, b: float64x1_t) {
2508325083
static_assert!(LANE == 0);
25084-
*a = simd_extract!(b, LANE as u32);
25084+
core::ptr::write_unaligned(a, simd_extract!(b, LANE as u32))
2508525085
}
2508625086
#[doc = "Store multiple single-element structures from one, two, three, or four registers"]
2508725087
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vst1q_lane_f64)"]
@@ -25094,7 +25094,7 @@ pub unsafe fn vst1_lane_f64<const LANE: i32>(a: *mut f64, b: float64x1_t) {
2509425094
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2509525095
pub unsafe fn vst1q_lane_f64<const LANE: i32>(a: *mut f64, b: float64x2_t) {
2509625096
static_assert_uimm_bits!(LANE, 1);
25097-
*a = simd_extract!(b, LANE as u32);
25097+
core::ptr::write_unaligned(a, simd_extract!(b, LANE as u32))
2509825098
}
2509925099
#[doc = "Store multiple 2-element structures from two registers"]
2510025100
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vst2_f64)"]

‎library/stdarch/crates/core_arch/src/aarch64/neon/mod.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub unsafe fn vld1q_dup_f64(ptr: *const f64) -> float64x2_t {
120120
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
121121
pub unsafe fn vld1_lane_f64<const LANE: i32>(ptr: *const f64, src: float64x1_t) -> float64x1_t {
122122
static_assert!(LANE == 0);
123-
simd_insert!(src, LANE as u32, *ptr)
123+
simd_insert!(src, LANE as u32, crate::ptr::read_unaligned(ptr))
124124
}
125125

126126
/// Load one single-element structure to one lane of one register.
@@ -131,7 +131,7 @@ pub unsafe fn vld1_lane_f64<const LANE: i32>(ptr: *const f64, src: float64x1_t)
131131
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
132132
pub unsafe fn vld1q_lane_f64<const LANE: i32>(ptr: *const f64, src: float64x2_t) -> float64x2_t {
133133
static_assert_uimm_bits!(LANE, 1);
134-
simd_insert!(src, LANE as u32, *ptr)
134+
simd_insert!(src, LANE as u32, crate::ptr::read_unaligned(ptr))
135135
}
136136

137137
/// Bitwise Select instructions. This instruction sets each bit in the destination SIMD&FP register

‎library/stdarch/crates/core_arch/src/aarch64/sve/generated.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
use stdarch_test::assert_instr;
1212

1313
use super::*;
14-
use crate::core_arch::arch::aarch64::*;
1514
use super::{AsSigned, AsUnsigned};
15+
use crate::core_arch::arch::aarch64::*;
1616

1717
#[doc = "Absolute difference"]
1818
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/svabd[_f32]_m)"]

0 commit comments

Comments
 (0)