diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-07-01 17:26:28 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-07-02 00:51:56 +0200 |
commit | d8dd1accb4566f718d0ba035c803f201d3d78578 (patch) | |
tree | 40c1c6f92e27d0b71829114fc1e577f985f9e387 | |
parent | c1939116554ee2c84f9612cf0cf91a6890e707b5 (diff) | |
download | VeraCrypt-d8dd1accb4566f718d0ba035c803f201d3d78578.tar.gz VeraCrypt-d8dd1accb4566f718d0ba035c803f201d3d78578.zip |
Avoid alignement issues with some old compilers by using movdqu instead of movdqa in SHA-256 SSE2 assembly.
-rw-r--r-- | src/Crypto/Sha2.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Crypto/Sha2.c b/src/Crypto/Sha2.c index 4c00762b..f4a44fb6 100644 --- a/src/Crypto/Sha2.c +++ b/src/Crypto/Sha2.c @@ -480,8 +480,8 @@ static void CRYPTOPP_FASTCALL X86_SHA256_HashBlocks(uint_32t *state, const uint_ ASJ( jnz, 2, f) AS1( dec DWORD PTR K_END) #endif - AS2( movdqa xmm0, XMMWORD_PTR [WORD_REG(cx)+0*16]) - AS2( movdqa xmm1, XMMWORD_PTR [WORD_REG(cx)+1*16]) + AS2( movdqu xmm0, XMMWORD_PTR [WORD_REG(cx)+0*16]) + AS2( movdqu xmm1, XMMWORD_PTR [WORD_REG(cx)+1*16]) #endif #if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 @@ -501,8 +501,8 @@ INTEL_NOPREFIX #if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE ASL(0) - AS2( movdqa E(0), xmm1) - AS2( movdqa A(0), xmm0) + AS2( movdqu E(0), xmm1) + AS2( movdqu A(0), xmm0) #endif #if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 ASL(3) @@ -569,12 +569,12 @@ INTEL_NOPREFIX AS2( test DWORD PTR K_END, 1) ASJ( jz, 4, f) #endif - AS2( movdqa xmm1, XMMWORD_PTR [AS_REG_7+1*16]) - AS2( movdqa xmm0, XMMWORD_PTR [AS_REG_7+0*16]) + AS2( movdqu xmm1, XMMWORD_PTR [AS_REG_7+1*16]) + AS2( movdqu xmm0, XMMWORD_PTR [AS_REG_7+0*16]) AS2( paddd xmm1, E(0)) AS2( paddd xmm0, A(0)) - AS2( movdqa [AS_REG_7+1*16], xmm1) - AS2( movdqa [AS_REG_7+0*16], xmm0) + AS2( movdqu [AS_REG_7+1*16], xmm1) + AS2( movdqu [AS_REG_7+0*16], xmm0) AS2( cmp WORD_REG(dx), DATA_END) ATT_NOPREFIX ASJ( jb, 0, b) |