diff options
author | Jack Lloyd <[email protected]> | 2017-09-16 12:08:44 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-09-16 12:08:44 -0400 |
commit | 5ca7d7d15d410ddd07acedcafa53cb7c6f40d45b (patch) | |
tree | bf2e714bc604b38a06ecd659ecac98aba3403ad0 /src/lib/utils/simd | |
parent | c9a5744dabf5efff45bb1cdfc89199ddac14499b (diff) |
Minor simplifications in SIMD_32 constructor
Diffstat (limited to 'src/lib/utils/simd')
-rw-r--r-- | src/lib/utils/simd/simd_32.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/utils/simd/simd_32.h b/src/lib/utils/simd/simd_32.h index 6d9223a38..f2b6351c6 100644 --- a/src/lib/utils/simd/simd_32.h +++ b/src/lib/utils/simd/simd_32.h @@ -58,13 +58,16 @@ class SIMD_4x32 final SIMD_4x32() // zero initialized { #if defined(BOTAN_SIMD_USE_SSE2) - ::memset(&m_sse, 0, sizeof(m_sse)); + m_sse = _mm_setzero_si128(); #elif defined(BOTAN_SIMD_USE_ALTIVEC) m_vmx = vec_splat_u32(0); #elif defined(BOTAN_SIMD_USE_NEON) m_neon = vdupq_n_u32(0); #else - ::memset(m_scalar, 0, sizeof(m_scalar)); + m_scalar[0] = 0; + m_scalar[1] = 0; + m_scalar[2] = 0; + m_scalar[3] = 0; #endif } |