summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2009-03-29 21:41:30 +0000
committerweidai <weidai11@users.noreply.github.com>2009-03-29 21:41:30 +0000
commit26666baa387d64e47fe0d7baeb53892d09c91d0b (patch)
tree36189d1e61a4dd014c9d392166aa0c24797a39ce
parent3be02e9a1a001fda2c5a1e07a9c4d4d255ff439b (diff)
downloadcryptopp-git-26666baa387d64e47fe0d7baeb53892d09c91d0b.tar.gz
fixed Panama x64 MASM code not saving RDI
-rw-r--r--panama.cpp6
-rwxr-xr-xx64masm.asm6
2 files changed, 8 insertions, 4 deletions
diff --git a/panama.cpp b/panama.cpp
index da84e367..7238f6c8 100644
--- a/panama.cpp
+++ b/panama.cpp
@@ -31,7 +31,8 @@ void Panama_SSE2_Pull(size_t count, word32 *state, word32 *z, const word32 *y);
#ifdef CRYPTOPP_GENERATE_X64_MASM
Panama_SSE2_Pull PROC FRAME
- alloc_stack(2*16+8)
+ rex_push_reg rdi
+ alloc_stack(2*16)
save_xmm128 xmm6, 0h
save_xmm128 xmm7, 10h
.endprolog
@@ -300,7 +301,8 @@ void CRYPTOPP_NOINLINE Panama_SSE2_Pull(size_t count, word32 *state, word32 *z,
#ifdef CRYPTOPP_GENERATE_X64_MASM
movdqa xmm6, [rsp + 0h]
movdqa xmm7, [rsp + 10h]
- add rsp, 2*16+8
+ add rsp, 2*16
+ pop rdi
ret
Panama_SSE2_Pull ENDP
#else
diff --git a/x64masm.asm b/x64masm.asm
index f27c0027..c7ff8362 100755
--- a/x64masm.asm
+++ b/x64masm.asm
@@ -1341,7 +1341,8 @@ ret
Sosemanuk_OperateKeystream ENDP
Panama_SSE2_Pull PROC FRAME
-alloc_stack(2*16+8)
+rex_push_reg rdi
+alloc_stack(2*16)
save_xmm128 xmm6, 0h
save_xmm128 xmm7, 10h
.endprolog
@@ -1555,7 +1556,8 @@ movdqa xmmword ptr [rdx+0*16], xmm0
label5:
movdqa xmm6, [rsp + 0h]
movdqa xmm7, [rsp + 10h]
-add rsp, 2*16+8
+add rsp, 2*16
+pop rdi
ret
Panama_SSE2_Pull ENDP