Fix GCC inline asm register constraint for SSE register

Also see https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html
pull/548/head
Jeffrey Walton 2017-11-17 01:01:12 -05:00
parent 3ed6ed39fa
commit dbd79a1e49
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
# Andy Polyakov, http://www.openssl.org/~appro/cryptogams/. # Andy Polyakov, http://www.openssl.org/~appro/cryptogams/.
if [ "x$1" = "x" ]; then if [ "x$1" = "x" ]; then
echo "usage: $0 on[demand]|pe[rformance]|?" echo "usage: $0 on[demand]|pe[rformance]|po[wersave]|us[erspace]?"
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
fi fi

View File

@ -86,7 +86,7 @@ static inline void GCM_Xor16_SSE2(byte *a, const byte *b, const byte *c)
{ {
# if CRYPTOPP_SSE2_ASM_AVAILABLE && defined(__GNUC__) # if CRYPTOPP_SSE2_ASM_AVAILABLE && defined(__GNUC__)
asm ("movdqa %1, %%xmm0; pxor %2, %%xmm0; movdqa %%xmm0, %0;" asm ("movdqa %1, %%xmm0; pxor %2, %%xmm0; movdqa %%xmm0, %0;"
: "=m" (a[0]) : "rm"(b[0]), "rm"(c[0])); : "=xm" (a[0]) : "xm"(b[0]), "xm"(c[0]));
# else // CRYPTOPP_SSE2_INTRIN_AVAILABLE # else // CRYPTOPP_SSE2_INTRIN_AVAILABLE
_mm_store_si128(M128_CAST(a), _mm_xor_si128( _mm_store_si128(M128_CAST(a), _mm_xor_si128(
_mm_load_si128(CONST_M128_CAST(b)), _mm_load_si128(CONST_M128_CAST(b)),