summaryrefslogtreecommitdiffstats
path: root/CryptoPP/rijndael.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-25 22:07:38 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-25 22:07:38 +0100
commitf50c14f91b9d7488caa45b1ab9faeaa6d6028f41 (patch)
treeb0bf16acbf79e6fcd45e3eee4309249f53dd028d /CryptoPP/rijndael.cpp
parentRails don't turn grass into dirt underneath them. (Patch contributed by STR_Warrior) (diff)
downloadcuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.tar
cuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.tar.gz
cuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.tar.bz2
cuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.tar.lz
cuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.tar.xz
cuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.tar.zst
cuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.zip
Diffstat (limited to '')
-rw-r--r--CryptoPP/rijndael.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/CryptoPP/rijndael.cpp b/CryptoPP/rijndael.cpp
index 608b9d30d..c185032cf 100644
--- a/CryptoPP/rijndael.cpp
+++ b/CryptoPP/rijndael.cpp
@@ -349,7 +349,11 @@ void Rijndael::Base::UncheckedSetKey(const byte *userKey, unsigned int keylen, c
void Rijndael::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
{
#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE) || CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE
+#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
if (HasSSE2())
+#else
+ if (HasAESNI())
+#endif
{
Rijndael::Enc::AdvancedProcessBlocks(inBlock, xorBlock, outBlock, 16, 0);
return;
@@ -522,7 +526,7 @@ CRYPTOPP_NAKED void CRYPTOPP_FASTCALL Rijndael_Enc_AdvancedProcessBlocks(void *l
#if CRYPTOPP_BOOL_X86
#define L_REG esp
-#define L_INDEX(i) (L_REG+512+i)
+#define L_INDEX(i) (L_REG+768+i)
#define L_INXORBLOCKS L_INBLOCKS+4
#define L_OUTXORBLOCKS L_INBLOCKS+8
#define L_OUTBLOCKS L_INBLOCKS+12
@@ -621,7 +625,7 @@ CRYPTOPP_NAKED void CRYPTOPP_FASTCALL Rijndael_Enc_AdvancedProcessBlocks(void *l
#if CRYPTOPP_BOOL_X86
AS2( mov [ecx+16*12+16*4], esp) // save esp to L_SP
- AS2( lea esp, [ecx-512])
+ AS2( lea esp, [ecx-768])
#endif
// copy subkeys to stack