mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-04-02 00:21:40 +00:00
Use inline for LEA_Encryption and LEA_Decryption
This commit is contained in:
parent
8279fab432
commit
09c8ae2835
@ -43,10 +43,9 @@
|
||||
# include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
#if (CRYPTOPP_SSSE3_AVAILABLE)
|
||||
# include <emmintrin.h>
|
||||
# include <pmmintrin.h>
|
||||
# include <tmmintrin.h>
|
||||
#if (CRYPTOPP_SSE2_INTRIN_AVAILABLE)
|
||||
# include <immintrin.h>
|
||||
# include <xmmintrin.h>
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_ALTIVEC_AVAILABLE)
|
||||
|
@ -255,7 +255,7 @@ inline uint32x4_t RepackNEON(const uint32x4_t& v)
|
||||
return UnpackNEON<IDX>(v);
|
||||
}
|
||||
|
||||
void LEA_Encryption(uint32x4_t temp[4], const word32 *subkeys, unsigned int rounds)
|
||||
inline void LEA_Encryption(uint32x4_t temp[4], const word32 *subkeys, unsigned int rounds)
|
||||
{
|
||||
temp[3] = RotateRight<3>(Add(Xor(temp[2], LoadKey<4>(subkeys)), Xor(temp[3], LoadKey<5>(subkeys))));
|
||||
temp[2] = RotateRight<5>(Add(Xor(temp[1], LoadKey<2>(subkeys)), Xor(temp[2], LoadKey<3>(subkeys))));
|
||||
@ -368,7 +368,7 @@ void LEA_Encryption(uint32x4_t temp[4], const word32 *subkeys, unsigned int roun
|
||||
}
|
||||
}
|
||||
|
||||
void LEA_Decryption(uint32x4_t temp[4], const word32 *subkeys, unsigned int rounds)
|
||||
inline void LEA_Decryption(uint32x4_t temp[4], const word32 *subkeys, unsigned int rounds)
|
||||
{
|
||||
if(rounds > 28)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user