[breaking change]: mask argument type of _mm_shuffle_ps

This commit is contained in:
gnzlbg 2018-11-03 12:41:02 +01:00 committed by gnzlbg
parent 1813fdc530
commit 59dd5729f7
2 changed files with 6 additions and 1 deletions

View file

@ -995,7 +995,7 @@ pub const fn _MM_SHUFFLE(z: u32, y: u32, x: u32, w: u32) -> i32 {
#[cfg_attr(test, assert_instr(shufps, mask = 3))]
#[rustc_args_required_const(2)]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub unsafe fn _mm_shuffle_ps(a: __m128, b: __m128, mask: u32) -> __m128 {
pub unsafe fn _mm_shuffle_ps(a: __m128, b: __m128, mask: i32) -> __m128 {
let mask = (mask & 0xFF) as u8;
macro_rules! shuffle_done {

View file

@ -155,6 +155,11 @@ fn verify_all_signatures() {
// https://github.com/rust-lang/rfcs/issues/2512
"ud2"
=> continue,
// Intel requires the mask argument for _mm_shuffle_ps to be an
// unsigned integer, but all other _mm_shuffle_.. intrinsics
// take a signed-integer. This breaks `_MM_SHUFFLE` for
// `_mm_shuffle_ps`:
"_mm_shuffle_ps" => continue,
_ => {}
}