diff options
Diffstat (limited to 'vendor/packed_simd_2/src/codegen/reductions/mask/x86.rs')
-rw-r--r-- | vendor/packed_simd_2/src/codegen/reductions/mask/x86.rs | 70 |
1 files changed, 49 insertions, 21 deletions
diff --git a/vendor/packed_simd_2/src/codegen/reductions/mask/x86.rs b/vendor/packed_simd_2/src/codegen/reductions/mask/x86.rs index bcfb1a6e1..4bf509806 100644 --- a/vendor/packed_simd_2/src/codegen/reductions/mask/x86.rs +++ b/vendor/packed_simd_2/src/codegen/reductions/mask/x86.rs @@ -114,17 +114,17 @@ macro_rules! x86_m64x4_impl { /// Fallback implementation. macro_rules! x86_intr_impl { ($id:ident) => { - impl All for $id { - #[inline] - unsafe fn all(self) -> bool { - use crate::llvm::simd_reduce_all; - simd_reduce_all(self.0) + impl All for $id { + #[inline] + unsafe fn all(self) -> bool { + use crate::llvm::simd_reduce_all; + simd_reduce_all(self.0) + } } - } impl Any for $id { #[inline] unsafe fn any(self) -> bool { - use crate::llvm::simd_reduce_any; + use crate::llvm::simd_reduce_any; simd_reduce_any(self.0) } } @@ -134,21 +134,47 @@ macro_rules! x86_intr_impl { /// Mask reduction implementation for `x86` and `x86_64` targets macro_rules! impl_mask_reductions { // 64-bit wide masks - (m8x8) => { x86_m8x8_impl!(m8x8); }; - (m16x4) => { x86_m8x8_impl!(m16x4); }; - (m32x2) => { x86_m8x8_impl!(m32x2); }; + (m8x8) => { + x86_m8x8_impl!(m8x8); + }; + (m16x4) => { + x86_m8x8_impl!(m16x4); + }; + (m32x2) => { + x86_m8x8_impl!(m32x2); + }; // 128-bit wide masks - (m8x16) => { x86_m8x16_impl!(m8x16); }; - (m16x8) => { x86_m8x16_impl!(m16x8); }; - (m32x4) => { x86_m32x4_impl!(m32x4); }; - (m64x2) => { x86_m64x2_impl!(m64x2); }; - (m128x1) => { x86_intr_impl!(m128x1); }; + (m8x16) => { + x86_m8x16_impl!(m8x16); + }; + (m16x8) => { + x86_m8x16_impl!(m16x8); + }; + (m32x4) => { + x86_m32x4_impl!(m32x4); + }; + (m64x2) => { + x86_m64x2_impl!(m64x2); + }; + (m128x1) => { + x86_intr_impl!(m128x1); + }; // 256-bit wide masks: - (m8x32) => { x86_m8x32_impl!(m8x32, m8x16); }; - (m16x16) => { x86_m8x32_impl!(m16x16, m16x8); }; - (m32x8) => { x86_m32x8_impl!(m32x8, m32x4); }; - (m64x4) => { x86_m64x4_impl!(m64x4, m64x2); }; - (m128x2) => { x86_intr_impl!(m128x2); }; + (m8x32) => { + x86_m8x32_impl!(m8x32, m8x16); + }; + (m16x16) => { + x86_m8x32_impl!(m16x16, m16x8); + }; + (m32x8) => { + x86_m32x8_impl!(m32x8, m32x4); + }; + (m64x4) => { + x86_m64x4_impl!(m64x4, m64x2); + }; + (m128x2) => { + x86_intr_impl!(m128x2); + }; (msizex2) => { cfg_if! { if #[cfg(target_pointer_width = "64")] { @@ -184,5 +210,7 @@ macro_rules! impl_mask_reductions { }; // Fallback to LLVM's default code-generation: - ($id:ident) => { fallback_impl!($id); }; + ($id:ident) => { + fallback_impl!($id); + }; } |