aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/utils')
-rw-r--r--src/lib/utils/simd/simd_avx2/simd_avx2.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/utils/simd/simd_avx2/simd_avx2.h b/src/lib/utils/simd/simd_avx2/simd_avx2.h
index 6e8c04f4b..fde086e53 100644
--- a/src/lib/utils/simd/simd_avx2/simd_avx2.h
+++ b/src/lib/utils/simd/simd_avx2/simd_avx2.h
@@ -227,6 +227,18 @@ class SIMD_8x32 final
B3.m_avx2 = _mm256_unpackhi_epi64(T2, T3);
}
+ BOTAN_FUNC_ISA("avx2")
+ static void reset_registers()
+ {
+ _mm256_zeroupper();
+ }
+
+ BOTAN_FUNC_ISA("avx2")
+ static void zero_registers()
+ {
+ _mm256_zeroall();
+ }
+
__m256i handle() const { return m_avx2; }
private: