/rust/registry/src/index.crates.io-1949cf8c6b5b557f/zeroize-1.9.0/src/x86.rs
Line | Count | Source |
1 | | //! [`Zeroize`] impls for x86 SIMD registers |
2 | | |
3 | | use crate::{Zeroize, optimization_barrier, volatile_write}; |
4 | | |
5 | | #[cfg(target_arch = "x86")] |
6 | | use core::arch::x86::*; |
7 | | #[cfg(target_arch = "x86_64")] |
8 | | use core::arch::x86_64::*; |
9 | | |
10 | | macro_rules! impl_zeroize_for_simd_register { |
11 | | ($($type:ty),* $(,)?) => { |
12 | | $( |
13 | | impl Zeroize for $type { |
14 | | #[inline] |
15 | 0 | fn zeroize(&mut self) { |
16 | 0 | volatile_write(self, unsafe { core::mem::zeroed() }); |
17 | 0 | optimization_barrier(self); |
18 | 0 | } Unexecuted instantiation: <core::core_arch::x86::__m128 as zeroize::Zeroize>::zeroize Unexecuted instantiation: <core::core_arch::x86::__m128i as zeroize::Zeroize>::zeroize Unexecuted instantiation: <core::core_arch::x86::__m256 as zeroize::Zeroize>::zeroize Unexecuted instantiation: <core::core_arch::x86::__m256d as zeroize::Zeroize>::zeroize Unexecuted instantiation: <core::core_arch::x86::__m256i as zeroize::Zeroize>::zeroize Unexecuted instantiation: <core::core_arch::x86::__m512 as zeroize::Zeroize>::zeroize Unexecuted instantiation: <core::core_arch::x86::__m512d as zeroize::Zeroize>::zeroize Unexecuted instantiation: <core::core_arch::x86::__m512i as zeroize::Zeroize>::zeroize Unexecuted instantiation: <core::core_arch::x86::__m128d as zeroize::Zeroize>::zeroize |
19 | | } |
20 | | )* |
21 | | }; |
22 | | } |
23 | | |
24 | | impl_zeroize_for_simd_register!( |
25 | | __m128, __m128d, __m128i, __m256, __m256d, __m256i, __m512, __m512d, __m512i |
26 | | ); |