interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / vendor / zeroize / src / aarch64.rs

31 lines · 714 bytes Raw Blame History
1//! [`Zeroize`] impls for ARM64 SIMD registers.
2
3use crate::{Zeroize, optimization_barrier, volatile_write};
4
5use core::arch::aarch64::*;
6
7macro_rules! impl_zeroize_for_simd_register {
8 ($($type:ty),* $(,)?) => {
9 $(
10 impl Zeroize for $type {
11 #[inline]
12 fn zeroize(&mut self) {
13 volatile_write(self, unsafe { core::mem::zeroed() });
14 optimization_barrier(self);
15 }
16 }
17 )+
18 };
19}
20
21// TODO(tarcieri): other NEON register types?
22impl_zeroize_for_simd_register! {
23 uint8x8_t,
24 uint8x16_t,
25 uint16x4_t,
26 uint16x8_t,
27 uint32x2_t,
28 uint32x4_t,
29 uint64x1_t,
30 uint64x2_t,
31}