From 790087c0fb2ca205a26935a0ea032d0b16e71f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Oliveira?= Date: Fri, 29 Sep 2017 15:33:15 +0100 Subject: [PATCH] Fix 'assert_*' tests by using the single precision instruction --- library/stdarch/src/x86/avx.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/library/stdarch/src/x86/avx.rs b/library/stdarch/src/x86/avx.rs index b4237c4b4cfc..6cefbc27bc86 100644 --- a/library/stdarch/src/x86/avx.rs +++ b/library/stdarch/src/x86/avx.rs @@ -26,7 +26,9 @@ pub unsafe fn _mm256_add_ps(a: f32x8, b: f32x8) -> f32x8 { /// in `a` and `b`. #[inline(always)] #[target_feature = "+avx"] -#[cfg_attr(test, assert_instr(vandpd))] +// Should be 'vandpd' instuction. +// See https://github.com/rust-lang-nursery/stdsimd/issues/71 +#[cfg_attr(test, assert_instr(vandps))] pub unsafe fn _mm256_and_pd(a: f64x4, b: f64x4) -> f64x4 { let a: u64x4 = mem::transmute(a); let b: u64x4 = mem::transmute(b); @@ -47,7 +49,9 @@ pub unsafe fn _mm256_and_ps(a: f32x8, b: f32x8) -> f32x8 { /// in `a` and `b`. #[inline(always)] #[target_feature = "+avx"] -#[cfg_attr(test, assert_instr(vorpd))] +// Should be 'vorpd' instuction. +// See https://github.com/rust-lang-nursery/stdsimd/issues/71 +#[cfg_attr(test, assert_instr(vorps))] pub unsafe fn _mm256_or_pd(a: f64x4, b: f64x4) -> f64x4 { let a: u64x4 = mem::transmute(a); let b: u64x4 = mem::transmute(b);