Skip to content

Commit d9e28d7

Browse files
committed
Auto merge of #153972 - folkertdev:stdarch-sync-2026-03-16, r=folkertdev,RalfJung
stdarch subtree update Subtree update of `stdarch` to rust-lang/stdarch@aa3fc33. Created using https://github.com/rust-lang/josh-sync. r? @ghost
2 parents b711f95 + a72acee commit d9e28d7

File tree

23 files changed

+817
-188
lines changed

23 files changed

+817
-188
lines changed

library/core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@
182182
#![feature(hexagon_target_feature)]
183183
#![feature(loongarch_target_feature)]
184184
#![feature(mips_target_feature)]
185+
#![feature(movrs_target_feature)]
185186
#![feature(nvptx_target_feature)]
186187
#![feature(powerpc_target_feature)]
187188
#![feature(riscv_target_feature)]

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Check Style
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v6
1212
- name: Install Rust
1313
run: rustup update nightly --no-self-update && rustup default nightly
1414
- run: ci/style.sh
@@ -18,7 +18,7 @@ jobs:
1818
needs: [style]
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v6
2222
- name: Install Rust
2323
run: rustup update nightly --no-self-update && rustup default nightly
2424
- run: ci/dox.sh
@@ -30,7 +30,7 @@ jobs:
3030
needs: [style]
3131
runs-on: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@v6
3434
- name: Install Rust
3535
run: rustup update nightly --no-self-update && rustup default nightly
3636
- run: cargo test --manifest-path crates/stdarch-verify/Cargo.toml
@@ -216,7 +216,7 @@ jobs:
216216
build_std: true
217217

218218
steps:
219-
- uses: actions/checkout@v4
219+
- uses: actions/checkout@v6
220220
- name: Install Rust
221221
run: |
222222
rustup update nightly --no-self-update
@@ -285,7 +285,7 @@ jobs:
285285
build_std: true
286286

287287
steps:
288-
- uses: actions/checkout@v4
288+
- uses: actions/checkout@v6
289289
- name: Install Rust
290290
run: |
291291
rustup update nightly --no-self-update
@@ -310,7 +310,7 @@ jobs:
310310
name: Check stdarch-gen-{arm, loongarch, hexagon} output
311311
runs-on: ubuntu-latest
312312
steps:
313-
- uses: actions/checkout@v4
313+
- uses: actions/checkout@v6
314314
- name: Install Rust
315315
run: rustup update nightly && rustup default nightly && rustup component add rustfmt
316316
- name: Check arm spec

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ mod mte;
1717
#[unstable(feature = "stdarch_aarch64_mte", issue = "129010")]
1818
pub use self::mte::*;
1919

20+
mod rand;
21+
#[unstable(feature = "stdarch_aarch64_rand", issue = "153514")]
22+
pub use self::rand::*;
23+
2024
mod neon;
2125
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
2226
pub use self::neon::*;

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

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,17 @@
33
//! [ACLE documentation](https://arm-software.github.io/acle/main/acle.html#markdown-toc-mte-intrinsics)
44
55
unsafe extern "unadjusted" {
6-
#[cfg_attr(
7-
any(target_arch = "aarch64", target_arch = "arm64ec"),
8-
link_name = "llvm.aarch64.irg"
9-
)]
6+
#[link_name = "llvm.aarch64.irg"]
107
fn irg_(ptr: *const (), exclude: i64) -> *const ();
11-
#[cfg_attr(
12-
any(target_arch = "aarch64", target_arch = "arm64ec"),
13-
link_name = "llvm.aarch64.gmi"
14-
)]
8+
#[link_name = "llvm.aarch64.gmi"]
159
fn gmi_(ptr: *const (), exclude: i64) -> i64;
16-
#[cfg_attr(
17-
any(target_arch = "aarch64", target_arch = "arm64ec"),
18-
link_name = "llvm.aarch64.ldg"
19-
)]
10+
#[link_name = "llvm.aarch64.ldg"]
2011
fn ldg_(ptr: *const (), tag_ptr: *const ()) -> *const ();
21-
#[cfg_attr(
22-
any(target_arch = "aarch64", target_arch = "arm64ec"),
23-
link_name = "llvm.aarch64.stg"
24-
)]
12+
#[link_name = "llvm.aarch64.stg"]
2513
fn stg_(tagged_ptr: *const (), addr_to_tag: *const ());
26-
#[cfg_attr(
27-
any(target_arch = "aarch64", target_arch = "arm64ec"),
28-
link_name = "llvm.aarch64.addg"
29-
)]
14+
#[link_name = "llvm.aarch64.addg"]
3015
fn addg_(ptr: *const (), value: i64) -> *const ();
31-
#[cfg_attr(
32-
any(target_arch = "aarch64", target_arch = "arm64ec"),
33-
link_name = "llvm.aarch64.subp"
34-
)]
16+
#[link_name = "llvm.aarch64.subp"]
3517
fn subp_(ptr_a: *const (), ptr_b: *const ()) -> i64;
3618
}
3719

@@ -127,42 +109,46 @@ mod test {
127109
use super::*;
128110
use stdarch_test::assert_instr;
129111

130-
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(irg))] // FIXME: MSVC `dumpbin` doesn't support MTE
112+
// Instruction tests are separate because the functions use generics.
113+
//
114+
// FIXME: As of 2026 MSVC `dumpbin` doesn't support MTE.
115+
116+
#[cfg_attr(not(target_env = "msvc"), assert_instr(irg))]
131117
#[allow(dead_code)]
132118
#[target_feature(enable = "mte")]
133119
unsafe fn test_arm_mte_create_random_tag(src: *const (), mask: u64) -> *const () {
134120
__arm_mte_create_random_tag(src, mask)
135121
}
136122

137-
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(addg))]
123+
#[cfg_attr(not(target_env = "msvc"), assert_instr(addg))]
138124
#[allow(dead_code)]
139125
#[target_feature(enable = "mte")]
140126
unsafe fn test_arm_mte_increment_tag(src: *const ()) -> *const () {
141127
__arm_mte_increment_tag::<1, _>(src)
142128
}
143129

144-
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(gmi))]
130+
#[cfg_attr(not(target_env = "msvc"), assert_instr(gmi))]
145131
#[allow(dead_code)]
146132
#[target_feature(enable = "mte")]
147133
unsafe fn test_arm_mte_exclude_tag(src: *const (), excluded: u64) -> u64 {
148134
__arm_mte_exclude_tag(src, excluded)
149135
}
150136

151-
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(stg))]
137+
#[cfg_attr(not(target_env = "msvc"), assert_instr(stg))]
152138
#[allow(dead_code)]
153139
#[target_feature(enable = "mte")]
154140
unsafe fn test_arm_mte_set_tag(src: *const ()) {
155141
__arm_mte_set_tag(src)
156142
}
157143

158-
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(ldg))]
144+
#[cfg_attr(not(target_env = "msvc"), assert_instr(ldg))]
159145
#[allow(dead_code)]
160146
#[target_feature(enable = "mte")]
161147
unsafe fn test_arm_mte_get_tag(src: *const ()) -> *const () {
162148
__arm_mte_get_tag(src)
163149
}
164150

165-
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(subp))]
151+
#[cfg_attr(not(target_env = "msvc"), assert_instr(subp))]
166152
#[allow(dead_code)]
167153
#[target_feature(enable = "mte")]
168154
unsafe fn test_arm_mte_ptrdiff(a: *const (), b: *const ()) -> i64 {

0 commit comments

Comments
 (0)