Update SPECK64 and SPECK128 OptimalDataAlignment

This commit is contained in:
Jeffrey Walton 2020-04-08 02:59:38 -04:00
parent 6287d4fb73
commit acf5c7de10
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 7 additions and 7 deletions

View File

@ -281,7 +281,7 @@ inline uint32x4_p VecLoad_ALTIVEC(int off, const byte src[16])
// http://www.nxp.com/docs/en/reference-manual/ALTIVECPEM.pdf
const uint8x16_p perm = vec_lvsl(off, src);
const uint8x16_p low = vec_ld(off, src);
const uint8x16_p high = vec_ld(15, src);
const uint8x16_p high = vec_ld(off+15, src);
return (uint32x4_p)vec_perm(low, high, perm);
}
}

View File

@ -240,15 +240,15 @@ unsigned int SPECK64::Base::OptimalDataAlignment() const
#if (CRYPTOPP_SPECK64_ADVANCED_PROCESS_BLOCKS)
# if (CRYPTOPP_SSE41_AVAILABLE)
if (HasSSE41())
return 16;
return 16; // load __m128i
# endif
# if (CRYPTOPP_ARM_NEON_AVAILABLE)
if (HasNEON())
return 4;
return 4; // load uint32x4_t
# endif
# if (CRYPTOPP_ALTIVEC_AVAILABLE)
if (HasAltivec())
return 16;
return 16; // load uint32x4_p
# endif
#endif
return GetAlignmentOf<word32>();
@ -368,15 +368,15 @@ unsigned int SPECK128::Base::OptimalDataAlignment() const
#if (CRYPTOPP_SPECK128_ADVANCED_PROCESS_BLOCKS)
# if (CRYPTOPP_SSSE3_AVAILABLE)
if (HasSSSE3())
return 16;
return 16; // load __m128i
# endif
# if (CRYPTOPP_ARM_NEON_AVAILABLE)
if (HasNEON())
return 8;
return 8; // load uint64x2_t
# endif
# if (CRYPTOPP_ALTIVEC_AVAILABLE)
if (HasAltivec())
return 8;
return 16; // load uint64x2_p
# endif
#endif
return GetAlignmentOf<word64>();