aboutsummaryrefslogtreecommitdiff
path: root/devel/cargo-c/files/patch-i386
blob: a7e039eaa0a2b84af6206ed7d8cdf1b1d4c9a4ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
https://github.com/nervosnetwork/faster-hex/pull/33

--- cargo-crates/faster-hex-0.8.0/src/lib.rs.orig	2006-07-24 01:21:28 UTC
+++ cargo-crates/faster-hex-0.8.0/src/lib.rs
@@ -71,10 +71,7 @@ pub(crate) fn vectorization_support() -> Vectorization
 
 // We enable xsave so it can inline the _xgetbv call.
 #[target_feature(enable = "xsave")]
-#[cfg(all(
-    any(target_arch = "x86", target_arch = "x86_64"),
-    target_feature = "sse"
-))]
+#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
 #[cold]
 unsafe fn vectorization_support_no_cache_x86() -> Vectorization {
     #[cfg(target_arch = "x86")]
@@ -127,6 +124,7 @@ mod tests {
                 Vectorization::AVX2 => assert!(is_x86_feature_detected!("avx2")),
                 Vectorization::SSE41 => assert!(is_x86_feature_detected!("sse4.1")),
                 Vectorization::None => assert!(
+                    !cfg!(target_feature = "sse") ||
                     !is_x86_feature_detected!("avx2") && !is_x86_feature_detected!("sse4.1")
                 ),
             }