From b1d3e9de6322ce5f54274bba6e38091fd9a826e3 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sun, 9 Oct 2011 21:53:53 +0000 Subject: [PATCH] e_padlock-x86_64.pl: brown-bag bug in stack pointer handling. --- engines/asm/e_padlock-x86_64.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engines/asm/e_padlock-x86_64.pl b/engines/asm/e_padlock-x86_64.pl index ad61974988..db79a62ad6 100644 --- a/engines/asm/e_padlock-x86_64.pl +++ b/engines/asm/e_padlock-x86_64.pl @@ -158,6 +158,7 @@ padlock_sha1_oneshot: .byte 0xf3,0x0f,0xa6,0xc8 # rep xsha1 movaps (%rsp),%xmm0 mov 16(%rsp),%eax + add \$128+8,%rsp movups %xmm0,(%rdx) # copy-out context mov %eax,16(%rdx) ret @@ -179,6 +180,7 @@ padlock_sha1_blocks: .byte 0xf3,0x0f,0xa6,0xc8 # rep xsha1 movaps (%rsp),%xmm0 mov 16(%rsp),%eax + add \$128+8,%rsp movups %xmm0,(%rdx) # copy-out context mov %eax,16(%rdx) ret @@ -200,6 +202,7 @@ padlock_sha256_oneshot: .byte 0xf3,0x0f,0xa6,0xd0 # rep xsha256 movaps (%rsp),%xmm0 movaps 16(%rsp),%xmm1 + add \$128+8,%rsp movups %xmm0,(%rdx) # copy-out context movups %xmm1,16(%rdx) ret @@ -221,6 +224,7 @@ padlock_sha256_blocks: .byte 0xf3,0x0f,0xa6,0xd0 # rep xsha256 movaps (%rsp),%xmm0 movaps 16(%rsp),%xmm1 + add \$128+8,%rsp movups %xmm0,(%rdx) # copy-out context movups %xmm1,16(%rdx) ret @@ -247,6 +251,7 @@ padlock_sha512_blocks: movaps 16(%rsp),%xmm1 movaps 32(%rsp),%xmm2 movaps 48(%rsp),%xmm3 + add \$128+8,%rsp movups %xmm0,(%rdx) # copy-out context movups %xmm1,16(%rdx) movups %xmm2,32(%rdx) -- 2.25.1