From 16290b2f1ca4f5ca8842d52f6bc4958222325976 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 24 Nov 2017 07:08:41 -0500 Subject: [PATCH] Fix crash on VIA C7-D when using GCM This was interesting... The C&-D is an early 2000's 32-bit processor with SSE2 and SSSE3. Using a destination register constraint of "xm" witnessed a crash, while a constraint of "m" does not --- gcm-simd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcm-simd.cpp b/gcm-simd.cpp index 487cde44..b0500593 100644 --- a/gcm-simd.cpp +++ b/gcm-simd.cpp @@ -439,7 +439,7 @@ void GCM_Xor16_SSE2(byte *a, const byte *b, const byte *c) { # if CRYPTOPP_SSE2_ASM_AVAILABLE && defined(__GNUC__) asm ("movdqa %1, %%xmm0; pxor %2, %%xmm0; movdqa %%xmm0, %0;" - : "=xm" (a[0]) : "xm"(b[0]), "xm"(c[0])); + : "=m" (a[0]) : "xm"(b[0]), "xm"(c[0])); # else // CRYPTOPP_SSE2_INTRIN_AVAILABLE _mm_store_si128(M128_CAST(a), _mm_xor_si128( _mm_load_si128(CONST_M128_CAST(b)),