Fix missing GF2NT_233_Multiply_Reduce_ARMv8 on Aarch64
parent
e388f2d88d
commit
62ce6db97d
18
gf2n.cpp
18
gf2n.cpp
|
|
@ -42,17 +42,17 @@ ANONYMOUS_NAMESPACE_END
|
|||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
#if defined(CRYPTOPP_CLMUL_AVAILABLE)
|
||||
#if (CRYPTOPP_CLMUL_AVAILABLE)
|
||||
extern void GF2NT_233_Multiply_Reduce_CLMUL(const word* pA, const word* pB, word* pC);
|
||||
extern void GF2NT_233_Square_Reduce_CLMUL(const word* pA, word* pC);
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_ARM_PMULL_AVAILABLE)
|
||||
#if (CRYPTOPP_ARM_PMULL_AVAILABLE)
|
||||
extern void GF2NT_233_Multiply_Reduce_ARMv8(const word* pA, const word* pB, word* pC);
|
||||
extern void GF2NT_233_Square_Reduce_ARMv8(const word* pA, word* pC);
|
||||
#endif
|
||||
|
||||
#if defined(CRYPTOPP_POWER8_VMULL_AVAILABLE)
|
||||
#if (CRYPTOPP_POWER8_VMULL_AVAILABLE)
|
||||
extern void GF2NT_233_Multiply_Reduce_POWER8(const word* pA, const word* pB, word* pC);
|
||||
extern void GF2NT_233_Square_Reduce_POWER8(const word* pA, word* pC);
|
||||
#endif
|
||||
|
|
@ -969,7 +969,7 @@ GF2NT233::GF2NT233(unsigned int c0, unsigned int c1, unsigned int c2)
|
|||
|
||||
const GF2NT::Element& GF2NT233::Multiply(const Element &a, const Element &b) const
|
||||
{
|
||||
#if defined(CRYPTOPP_CLMUL_AVAILABLE)
|
||||
#if (CRYPTOPP_CLMUL_AVAILABLE)
|
||||
if (HasCLMUL())
|
||||
{
|
||||
CRYPTOPP_ASSERT(a.reg.size()*WORD_BITS == 256);
|
||||
|
|
@ -984,7 +984,7 @@ const GF2NT::Element& GF2NT233::Multiply(const Element &a, const Element &b) con
|
|||
return result;
|
||||
}
|
||||
else
|
||||
#elif defined(CRYPTOPP_ARM_PMULL_AVAILABLE)
|
||||
#elif (CRYPTOPP_ARM_PMULL_AVAILABLE)
|
||||
if (HasPMULL())
|
||||
{
|
||||
CRYPTOPP_ASSERT(a.reg.size()*WORD_BITS == 256);
|
||||
|
|
@ -999,7 +999,7 @@ const GF2NT::Element& GF2NT233::Multiply(const Element &a, const Element &b) con
|
|||
return result;
|
||||
}
|
||||
else
|
||||
#elif defined(CRYPTOPP_POWER8_VMULL_AVAILABLE)
|
||||
#elif (CRYPTOPP_POWER8_VMULL_AVAILABLE)
|
||||
if (HasPMULL())
|
||||
{
|
||||
CRYPTOPP_ASSERT(a.reg.size()*WORD_BITS == 256);
|
||||
|
|
@ -1021,7 +1021,7 @@ const GF2NT::Element& GF2NT233::Multiply(const Element &a, const Element &b) con
|
|||
|
||||
const GF2NT::Element& GF2NT233::Square(const Element &a) const
|
||||
{
|
||||
#if defined(CRYPTOPP_CLMUL_AVAILABLE)
|
||||
#if (CRYPTOPP_CLMUL_AVAILABLE)
|
||||
if (HasCLMUL())
|
||||
{
|
||||
CRYPTOPP_ASSERT(a.reg.size()*WORD_BITS == 256);
|
||||
|
|
@ -1034,7 +1034,7 @@ const GF2NT::Element& GF2NT233::Square(const Element &a) const
|
|||
return result;
|
||||
}
|
||||
else
|
||||
#elif defined(CRYPTOPP_ARM_PMULL_AVAILABLE)
|
||||
#elif (CRYPTOPP_ARM_PMULL_AVAILABLE)
|
||||
if (HasPMULL())
|
||||
{
|
||||
CRYPTOPP_ASSERT(a.reg.size()*WORD_BITS == 256);
|
||||
|
|
@ -1047,7 +1047,7 @@ const GF2NT::Element& GF2NT233::Square(const Element &a) const
|
|||
return result;
|
||||
}
|
||||
else
|
||||
#elif defined(CRYPTOPP_POWER8_VMULL_AVAILABLE)
|
||||
#elif (CRYPTOPP_POWER8_VMULL_AVAILABLE)
|
||||
if (HasPMULL())
|
||||
{
|
||||
CRYPTOPP_ASSERT(a.reg.size()*WORD_BITS == 256);
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ GF2NT_233_Reduce_ARMv8(uint64x2_t& c3, uint64x2_t& c2, uint64x2_t& c1, uint64x2_
|
|||
|
||||
// ************************** SSE ************************** //
|
||||
|
||||
#if defined(CRYPTOPP_CLMUL_AVAILABLE)
|
||||
#if (CRYPTOPP_CLMUL_AVAILABLE)
|
||||
|
||||
using CryptoPP::word;
|
||||
|
||||
|
|
@ -303,7 +303,7 @@ GF2NT_233_Reduce_CLMUL(__m128i& c3, __m128i& c2, __m128i& c1, __m128i& c0)
|
|||
|
||||
// ************************* Power8 ************************* //
|
||||
|
||||
#if defined(CRYPTOPP_POWER8_VMULL_AVAILABLE)
|
||||
#if (CRYPTOPP_POWER8_VMULL_AVAILABLE)
|
||||
|
||||
using CryptoPP::byte;
|
||||
using CryptoPP::word;
|
||||
|
|
@ -458,7 +458,7 @@ ANONYMOUS_NAMESPACE_END
|
|||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
#if defined(CRYPTOPP_CLMUL_AVAILABLE)
|
||||
#if (CRYPTOPP_CLMUL_AVAILABLE)
|
||||
|
||||
void
|
||||
GF2NT_233_Multiply_Reduce_CLMUL(const word* pA, const word* pB, word* pC)
|
||||
|
|
@ -537,7 +537,7 @@ GF2NT_233_Square_Reduce_ARMv8(const word* pA, word* pC)
|
|||
vst1q_u32(pCC+4, vreinterpretq_u32_u64(c1));
|
||||
}
|
||||
|
||||
#elif defined(CRYPTOPP_POWER8_VMULL_AVAILABLE)
|
||||
#elif (CRYPTOPP_POWER8_VMULL_AVAILABLE)
|
||||
|
||||
void
|
||||
GF2NT_233_Multiply_Reduce_POWER8(const word* pA, const word* pB, word* pC)
|
||||
|
|
|
|||
Loading…
Reference in New Issue