Fix crash in GCM mode on ARM with -mthumb
parent
08235400b0
commit
6acbbf1849
|
|
@ -60,10 +60,6 @@
|
|||
#define M128_CAST(x) ((__m128i *)(void *)(x))
|
||||
#define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
||||
|
||||
// GCC cast warning
|
||||
#define UINT64X2_CAST(x) ((uint64x2_t *)(void *)(x))
|
||||
#define CONST_UINT64X2_CAST(x) ((const uint64x2_t *)(const void *)(x))
|
||||
|
||||
// Squash MS LNK4221 and libtool warnings
|
||||
extern const char GCM_SIMD_FNAME[] = __FILE__;
|
||||
|
||||
|
|
@ -219,10 +215,7 @@ bool CPU_ProbePMULL()
|
|||
#if CRYPTOPP_ARM_NEON_AVAILABLE
|
||||
void GCM_Xor16_NEON(byte *a, const byte *b, const byte *c)
|
||||
{
|
||||
CRYPTOPP_ASSERT(IsAlignedOn(a,GetAlignmentOf<uint64x2_t>()));
|
||||
CRYPTOPP_ASSERT(IsAlignedOn(b,GetAlignmentOf<uint64x2_t>()));
|
||||
CRYPTOPP_ASSERT(IsAlignedOn(c,GetAlignmentOf<uint64x2_t>()));
|
||||
*UINT64X2_CAST(a) = veorq_u64(*CONST_UINT64X2_CAST(b), *CONST_UINT64X2_CAST(c));
|
||||
vst1q_u8(a, veorq_u8(vld1q_u8(b), vld1q_u8(c)));
|
||||
}
|
||||
#endif // CRYPTOPP_ARM_NEON_AVAILABLE
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue