mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Use VecSplatWord instaed of VecSplats
This commit is contained in:
parent
8d1760a8f9
commit
38df1c0024
@ -1763,7 +1763,7 @@ inline T VecMergeHigh(const T vec1, const T vec2)
|
||||
/// \param val the 32-bit value
|
||||
/// \returns vector
|
||||
/// \since Crypto++ 8.3
|
||||
inline uint32x4_p VecSplats(word32 val)
|
||||
inline uint32x4_p VecSplatWord(word32 val)
|
||||
{
|
||||
#if defined(_ARCH_PWR8)
|
||||
return vec_splats(val);
|
||||
@ -1778,7 +1778,7 @@ inline uint32x4_p VecSplats(word32 val)
|
||||
/// \param val the 64-bit value
|
||||
/// \returns vector
|
||||
/// \since Crypto++ 8.3
|
||||
inline uint64x2_p VecSplats(word64 val)
|
||||
inline uint64x2_p VecSplatWord(word64 val)
|
||||
{
|
||||
// The PPC64 ABI says so.
|
||||
return vec_splats((unsigned long long)val);
|
||||
@ -2208,7 +2208,7 @@ inline T1 VecXor64(const T1 vec1, const T2 vec2)
|
||||
/// \param val the 64-bit value
|
||||
/// \returns vector
|
||||
/// \since Crypto++ 8.3
|
||||
inline uint32x4_p VecSplats64(word64 val)
|
||||
inline uint32x4_p VecSplatWord64(word64 val)
|
||||
{
|
||||
#if defined(_ARCH_PWR8)
|
||||
// The PPC64 ABI says so.
|
||||
|
@ -554,7 +554,7 @@ using CryptoPP::VecSub64;
|
||||
using CryptoPP::VecAnd64;
|
||||
using CryptoPP::VecOr64;
|
||||
using CryptoPP::VecXor64;
|
||||
using CryptoPP::VecSplats64;
|
||||
using CryptoPP::VecSplatWord64;
|
||||
using CryptoPP::VecRotateLeft64;
|
||||
using CryptoPP::VecRotateRight64;
|
||||
using CryptoPP::VecLoad;
|
||||
|
@ -487,7 +487,7 @@ using CryptoPP::VecSub64;
|
||||
using CryptoPP::VecAnd64;
|
||||
using CryptoPP::VecOr64;
|
||||
using CryptoPP::VecXor64;
|
||||
using CryptoPP::VecSplats64;
|
||||
using CryptoPP::VecSplatWord64;
|
||||
using CryptoPP::VecRotateLeft64;
|
||||
using CryptoPP::VecRotateRight64;
|
||||
using CryptoPP::VecLoad;
|
||||
@ -556,7 +556,7 @@ void SPECK128_Dec_Block(uint32x4_p &block, const word64 *subkeys, unsigned int r
|
||||
|
||||
for (int i = static_cast<int>(rounds-1); i >= 0; --i)
|
||||
{
|
||||
const speck128_t rk = (speck128_t)VecSplats64(subkeys[i]);
|
||||
const speck128_t rk = (speck128_t)VecSplatWord64(subkeys[i]);
|
||||
|
||||
y1 = (speck128_t)VecXor64(y1, x1);
|
||||
y1 = (speck128_t)VecRotateRight64<3>(y1);
|
||||
@ -660,7 +660,7 @@ void SPECK128_Dec_6_Blocks(uint32x4_p &block0, uint32x4_p &block1,
|
||||
|
||||
for (int i = static_cast<int>(rounds-1); i >= 0; --i)
|
||||
{
|
||||
const speck128_t rk = (speck128_t)VecSplats64(subkeys[i]);
|
||||
const speck128_t rk = (speck128_t)VecSplatWord64(subkeys[i]);
|
||||
|
||||
y1 = (speck128_t)VecXor64(y1, x1);
|
||||
y2 = (speck128_t)VecXor64(y2, x2);
|
||||
|
Loading…
Reference in New Issue
Block a user