Skip to content

Commit 3b7a1da

Browse files
committed
Run aarch64-pc-windows-msvc runs on the new windows-11-arm runners
1 parent 7155115 commit 3b7a1da

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

.github/workflows/main.yml

+13-6
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
- tuple: i686-pc-windows-msvc
117117
os: windows-2025
118118
- tuple: aarch64-pc-windows-msvc
119-
os: windows-2025
119+
os: windows-11-arm
120120
- tuple: x86_64-pc-windows-gnu
121121
os: windows-2025
122122
# - tuple: i686-pc-windows-gnu
@@ -199,24 +199,31 @@ jobs:
199199
tuple: aarch64-apple-ios-macabi
200200
os: macos-15
201201
norun: true # https://github.com/rust-lang/stdarch/issues/1206
202-
- target:
203-
tuple: aarch64-pc-windows-msvc
204-
os: windows-2025
205-
norun: true
206202

207203
steps:
208204
- uses: actions/checkout@v4
209205
- name: Install Rust
210206
run: |
211207
rustup update nightly --no-self-update
212208
rustup default nightly
209+
shell: bash
210+
if: matrix.target.os != 'windows-11-arm'
211+
- name: Install Rust for `windows-11-arm` runners
212+
# The arm runners don't have Rust pre-installed (https://github.com/actions/partner-runner-images/issues/77)
213+
run: |
214+
curl https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
215+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
216+
shell: bash
217+
if: matrix.target.os == 'windows-11-arm'
218+
213219
- run: rustup target add ${{ matrix.target.tuple }}
220+
shell: bash
214221
if: matrix.build_std == ''
215222
- run: |
216223
rustup component add rust-src
217224
echo "CARGO_UNSTABLE_BUILD_STD=std" >> $GITHUB_ENV
225+
shell: bash
218226
if: matrix.build_std != ''
219-
- run: cargo generate-lockfile
220227
221228
# Configure some env vars based on matrix configuration
222229
- run: echo "PROFILE=--profile=${{matrix.profile}}" >> $GITHUB_ENV

crates/core_arch/src/aarch64/mte.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -127,42 +127,42 @@ mod test {
127127
use super::*;
128128
use stdarch_test::assert_instr;
129129

130-
#[cfg_attr(test, assert_instr(irg))]
130+
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(irg))] // FIXME: MSVC `dumpbin` doesn't support MTE
131131
#[allow(dead_code)]
132132
#[target_feature(enable = "mte")]
133133
unsafe fn test_arm_mte_create_random_tag(src: *const (), mask: u64) -> *const () {
134134
__arm_mte_create_random_tag(src, mask)
135135
}
136136

137-
#[cfg_attr(test, assert_instr(addg))]
137+
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(addg))]
138138
#[allow(dead_code)]
139139
#[target_feature(enable = "mte")]
140140
unsafe fn test_arm_mte_increment_tag(src: *const ()) -> *const () {
141141
__arm_mte_increment_tag::<1, _>(src)
142142
}
143143

144-
#[cfg_attr(test, assert_instr(gmi))]
144+
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(gmi))]
145145
#[allow(dead_code)]
146146
#[target_feature(enable = "mte")]
147147
unsafe fn test_arm_mte_exclude_tag(src: *const (), excluded: u64) -> u64 {
148148
__arm_mte_exclude_tag(src, excluded)
149149
}
150150

151-
#[cfg_attr(test, assert_instr(stg))]
151+
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(stg))]
152152
#[allow(dead_code)]
153153
#[target_feature(enable = "mte")]
154154
unsafe fn test_arm_mte_set_tag(src: *const ()) {
155155
__arm_mte_set_tag(src)
156156
}
157157

158-
#[cfg_attr(test, assert_instr(ldg))]
158+
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(ldg))]
159159
#[allow(dead_code)]
160160
#[target_feature(enable = "mte")]
161161
unsafe fn test_arm_mte_get_tag(src: *const ()) -> *const () {
162162
__arm_mte_get_tag(src)
163163
}
164164

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

crates/core_arch/src/aarch64/neon/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,7 @@ pub fn vmovq_n_f64(value: f64) -> float64x2_t {
422422
/// Duplicate vector element to vector or scalar
423423
#[inline]
424424
#[target_feature(enable = "neon")]
425-
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(mov))]
426-
#[cfg_attr(all(test, target_env = "msvc"), assert_instr(dup))]
425+
#[cfg_attr(test, assert_instr(nop))]
427426
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
428427
pub fn vget_high_f64(a: float64x2_t) -> float64x1_t {
429428
unsafe { float64x1_t([simd_extract!(a, 1)]) }

0 commit comments

Comments
 (0)