mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Update SPECK64 and SPECK128 OptimalDataAlignment
This commit is contained in:
parent
6287d4fb73
commit
acf5c7de10
@ -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);
|
||||
}
|
||||
}
|
||||
|
12
speck.cpp
12
speck.cpp
@ -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>();
|
||||
|
Loading…
Reference in New Issue
Block a user