diff options
author | Jeffrey Walton <noloader@gmail.com> | 2020-07-09 12:16:55 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2020-07-09 12:16:55 -0400 |
commit | 3bed6789e3d3ce305579d5ffbf69fb9b9a903540 (patch) | |
tree | 22852f3774941dc2a20d9872b51ca87677411ab2 /vmac.cpp | |
parent | b9601396b7fb9250a3e0167f64d6b2a4fc2eaca7 (diff) | |
download | cryptopp-git-3bed6789e3d3ce305579d5ffbf69fb9b9a903540.tar.gz |
Update comments in VMAC
Diffstat (limited to 'vmac.cpp')
-rw-r--r-- | vmac.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -207,10 +207,14 @@ void VMAC_Base::VHASH_Update_SSE2(const word64 *data, size_t blocksRemainingInWo __asm__ __volatile__
(
# if CRYPTOPP_BOOL_X86
- // Save EBX for PIC
+ // Hack. Save EBX for PIC. Do NOT 'push EBX' here.
+ // GCC issues 'mov ESP+8, EBX' to load L1KeyLength.
+ // A push breaks the reference to L1KeyLength.
AS2( mov %%ebx, -20(%%esp))
# endif
- AS2( mov %0, %%ebx) // L1KeyLength into EBX
+ // L1KeyLength into EBX.
+ // GCC generates 'mov ESP+8, EBX'.
+ AS2( mov %0, %%ebx)
INTEL_NOPREFIX
#else
#if defined(__INTEL_COMPILER)
@@ -223,7 +227,7 @@ void VMAC_Base::VHASH_Update_SSE2(const word64 *data, size_t blocksRemainingInWo AS2( mov dl, [ecx+m_isFirstBlock])
#endif
AS2( mov eax, tagPart)
- AS2( shl eax, 4)
+ AS2( shl eax, 4)
AS2( mov edi, nhK)
AS2( add edi, eax)
AS2( add eax, eax)
|