Skip to content

Commit 78065b8

Browse files
committed
[breaking change]: mask argument type of _mm_shuffle_ps
1 parent 45f8450 commit 78065b8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

crates/core_arch/src/x86/sse.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ pub const fn _MM_SHUFFLE(z: u32, y: u32, x: u32, w: u32) -> i32 {
995995
#[cfg_attr(test, assert_instr(shufps, mask = 3))]
996996
#[rustc_args_required_const(2)]
997997
#[stable(feature = "simd_x86", since = "1.27.0")]
998-
pub unsafe fn _mm_shuffle_ps(a: __m128, b: __m128, mask: u32) -> __m128 {
998+
pub unsafe fn _mm_shuffle_ps(a: __m128, b: __m128, mask: i32) -> __m128 {
999999
let mask = (mask & 0xFF) as u8;
10001000

10011001
macro_rules! shuffle_done {

crates/stdsimd-verify/tests/x86-intel.rs

+5
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ fn verify_all_signatures() {
155155
// https://github.com/rust-lang/rfcs/issues/2512
156156
"ud2"
157157
=> continue,
158+
// Intel requires the mask argument for _mm_shuffle_ps to be an
159+
// unsigned integer, but all other _mm_shuffle_.. intrinsics
160+
// take a signed-integer. This breaks `_MM_SHUFFLE` for
161+
// `_mm_shuffle_ps`:
162+
"_mm_shuffle_ps" => continue,
158163
_ => {}
159164
}
160165

0 commit comments

Comments
 (0)