mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Use consistent suffix for SSE2 ASM
This commit is contained in:
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
|
||||
extern "C" {
|
||||
void GCM_AuthenticateBlocks_2K(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_2K_SSE2(const byte *data, size_t blocks, word64 *hashBuffer, const word16 *reductionTable);
|
||||
void GCM_AuthenticateBlocks_64K_SSE2(const byte *data, size_t blocks, word64 *hashBuffer);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -550,10 +550,10 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||
|
||||
#ifdef CRYPTOPP_X64_MASM_AVAILABLE
|
||||
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;
|
||||
case 3: // SSE2 and 64K tables
|
||||
GCM_AuthenticateBlocks_64K(data, len/16, hashBuffer);
|
||||
GCM_AuthenticateBlocks_64K_SSE2(data, len/16, hashBuffer);
|
||||
return len % 16;
|
||||
#endif
|
||||
|
||||
@ -566,7 +566,7 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||
INTEL_NOPREFIX
|
||||
#elif defined(CRYPTOPP_GENERATE_X64_MASM)
|
||||
ALIGN 8
|
||||
GCM_AuthenticateBlocks_2K PROC FRAME
|
||||
GCM_AuthenticateBlocks_2K_SSE2 PROC FRAME
|
||||
rex_push_reg rsi
|
||||
push_reg rdi
|
||||
push_reg rbx
|
||||
@ -734,7 +734,7 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||
pop rdi
|
||||
pop rsi
|
||||
ret
|
||||
GCM_AuthenticateBlocks_2K ENDP
|
||||
GCM_AuthenticateBlocks_2K_SSE2 ENDP
|
||||
#endif
|
||||
|
||||
return len%16;
|
||||
@ -747,7 +747,7 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||
INTEL_NOPREFIX
|
||||
#elif defined(CRYPTOPP_GENERATE_X64_MASM)
|
||||
ALIGN 8
|
||||
GCM_AuthenticateBlocks_64K PROC FRAME
|
||||
GCM_AuthenticateBlocks_64K_SSE2 PROC FRAME
|
||||
rex_push_reg rsi
|
||||
push_reg rdi
|
||||
.endprolog
|
||||
@ -809,7 +809,7 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||
pop rdi
|
||||
pop rsi
|
||||
ret
|
||||
GCM_AuthenticateBlocks_64K ENDP
|
||||
GCM_AuthenticateBlocks_64K_SSE2 ENDP
|
||||
#endif
|
||||
|
||||
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)
|
||||
|
||||
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);
|
||||
|
||||
@ -1238,7 +1238,7 @@ CRYPTOPP_NAKED void CRYPTOPP_FASTCALL Rijndael_Enc_AdvancedProcessBlocks(void *l
|
||||
|
||||
#ifdef CRYPTOPP_X64_MASM_AVAILABLE
|
||||
extern "C" {
|
||||
void Rijndael_Enc_AdvancedProcessBlocks(void *locals, const word32 *k);
|
||||
void Rijndael_Enc_AdvancedProcessBlocks_SSE2(void *locals, const word32 *k);
|
||||
}
|
||||
#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);
|
||||
locals.keysBegin = (12-keysToCopy)*16;
|
||||
|
||||
Rijndael_Enc_AdvancedProcessBlocks(&locals, m_key);
|
||||
Rijndael_Enc_AdvancedProcessBlocks_SSE2(&locals, m_key);
|
||||
|
||||
return length % BLOCKSIZE;
|
||||
}
|
||||
|
12
x64dll.asm
12
x64dll.asm
@ -58,7 +58,7 @@ $1@Baseline_Sub:
|
||||
Baseline_Sub ENDP
|
||||
|
||||
ALIGN 8
|
||||
Rijndael_Enc_AdvancedProcessBlocks PROC FRAME
|
||||
Rijndael_Enc_AdvancedProcessBlocks_SSE2 PROC FRAME
|
||||
rex_push_reg rsi
|
||||
push_reg rdi
|
||||
push_reg rbx
|
||||
@ -454,10 +454,10 @@ pop rbx
|
||||
pop rdi
|
||||
pop rsi
|
||||
ret
|
||||
Rijndael_Enc_AdvancedProcessBlocks ENDP
|
||||
Rijndael_Enc_AdvancedProcessBlocks_SSE2 ENDP
|
||||
|
||||
ALIGN 8
|
||||
GCM_AuthenticateBlocks_2K PROC FRAME
|
||||
GCM_AuthenticateBlocks_2K_SSE2 PROC FRAME
|
||||
rex_push_reg rsi
|
||||
push_reg rdi
|
||||
push_reg rbx
|
||||
@ -593,10 +593,10 @@ pop rbx
|
||||
pop rdi
|
||||
pop rsi
|
||||
ret
|
||||
GCM_AuthenticateBlocks_2K ENDP
|
||||
GCM_AuthenticateBlocks_2K_SSE2 ENDP
|
||||
|
||||
ALIGN 8
|
||||
GCM_AuthenticateBlocks_64K PROC FRAME
|
||||
GCM_AuthenticateBlocks_64K_SSE2 PROC FRAME
|
||||
rex_push_reg rsi
|
||||
push_reg rdi
|
||||
.endprolog
|
||||
@ -673,7 +673,7 @@ movdqa [rsi], xmm0
|
||||
pop rdi
|
||||
pop rsi
|
||||
ret
|
||||
GCM_AuthenticateBlocks_64K ENDP
|
||||
GCM_AuthenticateBlocks_64K_SSE2 ENDP
|
||||
|
||||
ALIGN 8
|
||||
SHA256_HashMultipleBlocks_SSE2 PROC FRAME
|
||||
|
Loading…
Reference in New Issue
Block a user