diff options
Diffstat (limited to 'tests/bench.rs')
-rw-r--r-- | tests/bench.rs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/bench.rs b/tests/bench.rs index 16904c0..9e6dccc 100644 --- a/tests/bench.rs +++ b/tests/bench.rs @@ -4,22 +4,34 @@ use fxhash::FxHasher; use std::collections::hash_map::DefaultHasher; use std::hash::{Hash, Hasher}; -#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes"))] +#[cfg(any( + all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)), + all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd") +))] fn aeshash<H: Hash>(b: &H) -> u64 { let build_hasher = RandomState::with_seeds(1, 2, 3, 4); H::get_hash(b, &build_hasher) } -#[cfg(not(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes")))] +#[cfg(not(any( + all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)), + all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd") +)))] fn aeshash<H: Hash>(_b: &H) -> u64 { panic!("aes must be enabled") } -#[cfg(not(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes")))] +#[cfg(not(any( + all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)), + all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd") +)))] fn fallbackhash<H: Hash>(b: &H) -> u64 { let build_hasher = RandomState::with_seeds(1, 2, 3, 4); H::get_hash(b, &build_hasher) } -#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes"))] +#[cfg(any( + all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)), + all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd") +))] fn fallbackhash<H: Hash>(_b: &H) -> u64 { panic!("aes must be disabled") } |