Skip to content

Commit 4d823d1

Browse files
Merge pull request #290 from Stupremee/fix-missing-mmx
Replace `_mm_movemask_pi8` with the fallback_impl
2 parents 7301ba7 + 950903a commit 4d823d1

File tree

3 files changed

+1
-40
lines changed

3 files changed

+1
-40
lines changed

src/codegen/reductions/mask/x86.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@ mod avx2;
1919
/// x86 64-bit m8x8 implementation
2020
macro_rules! x86_m8x8_impl {
2121
($id:ident) => {
22-
cfg_if! {
23-
if #[cfg(all(target_arch = "x86_64", target_feature = "sse"))] {
24-
x86_m8x8_sse_impl!($id);
25-
} else {
26-
fallback_impl!($id);
27-
}
28-
}
22+
fallback_impl!($id);
2923
};
3024
}
3125

src/codegen/reductions/mask/x86/sse.rs

-32
Original file line numberDiff line numberDiff line change
@@ -34,35 +34,3 @@ macro_rules! x86_m32x4_sse_impl {
3434
}
3535
};
3636
}
37-
38-
macro_rules! x86_m8x8_sse_impl {
39-
($id:ident) => {
40-
impl All for $id {
41-
#[inline]
42-
#[target_feature(enable = "sse")]
43-
unsafe fn all(self) -> bool {
44-
#[cfg(target_arch = "x86")]
45-
use crate::arch::x86::_mm_movemask_pi8;
46-
#[cfg(target_arch = "x86_64")]
47-
use crate::arch::x86_64::_mm_movemask_pi8;
48-
// _mm_movemask_pi8(a) creates an 8bit mask containing the most
49-
// significant bit of each byte of `a`. If all bits are set,
50-
// then all 8 lanes of the mask are true.
51-
_mm_movemask_pi8(crate::mem::transmute(self))
52-
== u8::max_value() as i32
53-
}
54-
}
55-
impl Any for $id {
56-
#[inline]
57-
#[target_feature(enable = "sse")]
58-
unsafe fn any(self) -> bool {
59-
#[cfg(target_arch = "x86")]
60-
use crate::arch::x86::_mm_movemask_pi8;
61-
#[cfg(target_arch = "x86_64")]
62-
use crate::arch::x86_64::_mm_movemask_pi8;
63-
64-
_mm_movemask_pi8(crate::mem::transmute(self)) != 0
65-
}
66-
}
67-
};
68-
}

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@
209209
link_llvm_intrinsics,
210210
core_intrinsics,
211211
stmt_expr_attributes,
212-
mmx_target_feature,
213212
crate_visibility_modifier,
214213
custom_inner_attributes
215214
)]

0 commit comments

Comments
 (0)