Use consistent suffix for SSE2 ASM
parent
8c5a558663
commit
01779726db
16
gcm.cpp
16
gcm.cpp
|
|
@ -378,8 +378,8 @@ unsigned int GCM_Base::OptimalDataAlignment() const
|
||||||
|
|
||||||
#ifdef CRYPTOPP_X64_MASM_AVAILABLE
|
#ifdef CRYPTOPP_X64_MASM_AVAILABLE
|
||||||
extern "C" {
|
extern "C" {
|
||||||
void GCM_AuthenticateBlocks_2K(const byte *data, size_t blocks, word64 *hashBuffer, const word16 *reductionTable);
|
void GCM_AuthenticateBlocks_2K_SSE2(const byte *data, size_t blocks, word64 *hashBuffer, const word16 *reductionTable);
|
||||||
void GCM_AuthenticateBlocks_64K(const byte *data, size_t blocks, word64 *hashBuffer);
|
void GCM_AuthenticateBlocks_64K_SSE2(const byte *data, size_t blocks, word64 *hashBuffer);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -550,10 +550,10 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||||
|
|
||||||
#ifdef CRYPTOPP_X64_MASM_AVAILABLE
|
#ifdef CRYPTOPP_X64_MASM_AVAILABLE
|
||||||
case 1: // SSE2 and 2K tables
|
case 1: // SSE2 and 2K tables
|
||||||
GCM_AuthenticateBlocks_2K(data, len/16, hashBuffer, s_reductionTable);
|
GCM_AuthenticateBlocks_2K_SSE2(data, len/16, hashBuffer, s_reductionTable);
|
||||||
return len % 16;
|
return len % 16;
|
||||||
case 3: // SSE2 and 64K tables
|
case 3: // SSE2 and 64K tables
|
||||||
GCM_AuthenticateBlocks_64K(data, len/16, hashBuffer);
|
GCM_AuthenticateBlocks_64K_SSE2(data, len/16, hashBuffer);
|
||||||
return len % 16;
|
return len % 16;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -566,7 +566,7 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||||
INTEL_NOPREFIX
|
INTEL_NOPREFIX
|
||||||
#elif defined(CRYPTOPP_GENERATE_X64_MASM)
|
#elif defined(CRYPTOPP_GENERATE_X64_MASM)
|
||||||
ALIGN 8
|
ALIGN 8
|
||||||
GCM_AuthenticateBlocks_2K PROC FRAME
|
GCM_AuthenticateBlocks_2K_SSE2 PROC FRAME
|
||||||
rex_push_reg rsi
|
rex_push_reg rsi
|
||||||
push_reg rdi
|
push_reg rdi
|
||||||
push_reg rbx
|
push_reg rbx
|
||||||
|
|
@ -734,7 +734,7 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||||
pop rdi
|
pop rdi
|
||||||
pop rsi
|
pop rsi
|
||||||
ret
|
ret
|
||||||
GCM_AuthenticateBlocks_2K ENDP
|
GCM_AuthenticateBlocks_2K_SSE2 ENDP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return len%16;
|
return len%16;
|
||||||
|
|
@ -747,7 +747,7 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||||
INTEL_NOPREFIX
|
INTEL_NOPREFIX
|
||||||
#elif defined(CRYPTOPP_GENERATE_X64_MASM)
|
#elif defined(CRYPTOPP_GENERATE_X64_MASM)
|
||||||
ALIGN 8
|
ALIGN 8
|
||||||
GCM_AuthenticateBlocks_64K PROC FRAME
|
GCM_AuthenticateBlocks_64K_SSE2 PROC FRAME
|
||||||
rex_push_reg rsi
|
rex_push_reg rsi
|
||||||
push_reg rdi
|
push_reg rdi
|
||||||
.endprolog
|
.endprolog
|
||||||
|
|
@ -809,7 +809,7 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||||
pop rdi
|
pop rdi
|
||||||
pop rsi
|
pop rsi
|
||||||
ret
|
ret
|
||||||
GCM_AuthenticateBlocks_64K ENDP
|
GCM_AuthenticateBlocks_64K_SSE2 ENDP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return len%16;
|
return len%16;
|
||||||
|
|
|
||||||
|
|
@ -760,7 +760,7 @@ void Rijndael::Dec::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock
|
||||||
|
|
||||||
#if CRYPTOPP_SSE2_ASM_AVAILABLE && !defined(CRYPTOPP_DISABLE_RIJNDAEL_ASM)
|
#if CRYPTOPP_SSE2_ASM_AVAILABLE && !defined(CRYPTOPP_DISABLE_RIJNDAEL_ASM)
|
||||||
|
|
||||||
CRYPTOPP_NAKED void CRYPTOPP_FASTCALL Rijndael_Enc_AdvancedProcessBlocks(void *locals, const word32 *k)
|
CRYPTOPP_NAKED void CRYPTOPP_FASTCALL Rijndael_Enc_AdvancedProcessBlocks_SSE2(void *locals, const word32 *k)
|
||||||
{
|
{
|
||||||
CRYPTOPP_UNUSED(locals); CRYPTOPP_UNUSED(k);
|
CRYPTOPP_UNUSED(locals); CRYPTOPP_UNUSED(k);
|
||||||
|
|
||||||
|
|
@ -1238,7 +1238,7 @@ CRYPTOPP_NAKED void CRYPTOPP_FASTCALL Rijndael_Enc_AdvancedProcessBlocks(void *l
|
||||||
|
|
||||||
#ifdef CRYPTOPP_X64_MASM_AVAILABLE
|
#ifdef CRYPTOPP_X64_MASM_AVAILABLE
|
||||||
extern "C" {
|
extern "C" {
|
||||||
void Rijndael_Enc_AdvancedProcessBlocks(void *locals, const word32 *k);
|
void Rijndael_Enc_AdvancedProcessBlocks_SSE2(void *locals, const word32 *k);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -1302,7 +1302,7 @@ size_t Rijndael::Enc::AdvancedProcessBlocks(const byte *inBlocks, const byte *xo
|
||||||
int keysToCopy = m_rounds - (flags & BT_InBlockIsCounter ? 3 : 2);
|
int keysToCopy = m_rounds - (flags & BT_InBlockIsCounter ? 3 : 2);
|
||||||
locals.keysBegin = (12-keysToCopy)*16;
|
locals.keysBegin = (12-keysToCopy)*16;
|
||||||
|
|
||||||
Rijndael_Enc_AdvancedProcessBlocks(&locals, m_key);
|
Rijndael_Enc_AdvancedProcessBlocks_SSE2(&locals, m_key);
|
||||||
|
|
||||||
return length % BLOCKSIZE;
|
return length % BLOCKSIZE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
x64dll.asm
12
x64dll.asm
|
|
@ -58,7 +58,7 @@ $1@Baseline_Sub:
|
||||||
Baseline_Sub ENDP
|
Baseline_Sub ENDP
|
||||||
|
|
||||||
ALIGN 8
|
ALIGN 8
|
||||||
Rijndael_Enc_AdvancedProcessBlocks PROC FRAME
|
Rijndael_Enc_AdvancedProcessBlocks_SSE2 PROC FRAME
|
||||||
rex_push_reg rsi
|
rex_push_reg rsi
|
||||||
push_reg rdi
|
push_reg rdi
|
||||||
push_reg rbx
|
push_reg rbx
|
||||||
|
|
@ -454,10 +454,10 @@ pop rbx
|
||||||
pop rdi
|
pop rdi
|
||||||
pop rsi
|
pop rsi
|
||||||
ret
|
ret
|
||||||
Rijndael_Enc_AdvancedProcessBlocks ENDP
|
Rijndael_Enc_AdvancedProcessBlocks_SSE2 ENDP
|
||||||
|
|
||||||
ALIGN 8
|
ALIGN 8
|
||||||
GCM_AuthenticateBlocks_2K PROC FRAME
|
GCM_AuthenticateBlocks_2K_SSE2 PROC FRAME
|
||||||
rex_push_reg rsi
|
rex_push_reg rsi
|
||||||
push_reg rdi
|
push_reg rdi
|
||||||
push_reg rbx
|
push_reg rbx
|
||||||
|
|
@ -593,10 +593,10 @@ pop rbx
|
||||||
pop rdi
|
pop rdi
|
||||||
pop rsi
|
pop rsi
|
||||||
ret
|
ret
|
||||||
GCM_AuthenticateBlocks_2K ENDP
|
GCM_AuthenticateBlocks_2K_SSE2 ENDP
|
||||||
|
|
||||||
ALIGN 8
|
ALIGN 8
|
||||||
GCM_AuthenticateBlocks_64K PROC FRAME
|
GCM_AuthenticateBlocks_64K_SSE2 PROC FRAME
|
||||||
rex_push_reg rsi
|
rex_push_reg rsi
|
||||||
push_reg rdi
|
push_reg rdi
|
||||||
.endprolog
|
.endprolog
|
||||||
|
|
@ -673,7 +673,7 @@ movdqa [rsi], xmm0
|
||||||
pop rdi
|
pop rdi
|
||||||
pop rsi
|
pop rsi
|
||||||
ret
|
ret
|
||||||
GCM_AuthenticateBlocks_64K ENDP
|
GCM_AuthenticateBlocks_64K_SSE2 ENDP
|
||||||
|
|
||||||
ALIGN 8
|
ALIGN 8
|
||||||
SHA256_HashMultipleBlocks_SSE2 PROC FRAME
|
SHA256_HashMultipleBlocks_SSE2 PROC FRAME
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue