opnsense-ports/devel/cargo-c/files/patch-i386
Franco Fichtner 5ecd0dc023 */*: sync with upstream
Taken from: FreeBSD
2023-08-28 15:10:57 +02:00

24 lines
1 KiB
Text

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")
),
}