Fix GCC inline asm register constraint for SSE register
Also see https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.htmlpull/548/head
parent
3ed6ed39fa
commit
dbd79a1e49
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
2
gcm.cpp
2
gcm.cpp
|
|
@ -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)),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue