diff --git a/src/aead/aes_gcm.rs b/src/aead/aes_gcm.rs index ca44ac3403..feb4df1e28 100644 --- a/src/aead/aes_gcm.rs +++ b/src/aead/aes_gcm.rs @@ -218,6 +218,16 @@ pub(super) fn seal( } } +#[cfg_attr( + any( + target_arch = "aarch64", + target_arch = "arm", + target_arch = "x86", + target_arch = "x86_64" + ), + inline(never) +)] +#[cfg_attr(any(target_arch = "aarch64", target_arch = "x86_64"), cold)] fn seal_strided( Combo { aes_key, gcm_key }: &Combo, aad: Aad<&[u8]>, @@ -392,7 +402,20 @@ 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(target_arch = "aarch64", target_arch = "x86_64"), cold)] fn open_strided( Combo { aes_key, gcm_key }: &Combo, aad: Aad<&[u8]>,