diff --git a/src/aead/aes_gcm.rs b/src/aead/aes_gcm.rs index ca44ac3403..8472c93c37 100644 --- a/src/aead/aes_gcm.rs +++ b/src/aead/aes_gcm.rs @@ -218,6 +218,26 @@ pub(super) fn seal( } } +#[cfg_attr( + any( + all( + any(target_arch = "aarch64", target_arch = "arm"), + target_feature = "neon" + ), + all( + any(target_arch = "x86", target_arch = "x86_64"), + target_feature = "sse" + ) + ), + inline(never) +)] +#[cfg_attr( + any( + all(target_arch = "aarch64", target_feature = "neon"), + all(target_arch = "x86_64", target_feature = "sse") + ), + cold +)] fn seal_strided( Combo { aes_key, gcm_key }: &Combo, aad: Aad<&[u8]>, @@ -392,7 +412,26 @@ pub(super) fn open( } } -#[inline(always)] +#[cfg_attr( + any( + all( + any(target_arch = "aarch64", target_arch = "arm"), + target_feature = "neon" + ), + all( + any(target_arch = "x86", target_arch = "x86_64"), + target_feature = "sse" + ) + ), + inline(never) +)] +#[cfg_attr( + any( + all(target_arch = "aarch64", target_feature = "neon"), + all(target_arch = "x86_64", target_feature = "sse") + ), + cold +)] fn open_strided( Combo { aes_key, gcm_key }: &Combo, aad: Aad<&[u8]>,