[PATCHv3,24/30] x86/call32: reserve space for saving 64-bit sp on 32-bit stack

Submitted by Dmitry Safonov on June 28, 2016, 7:24 p.m.

Details

Message ID 20160628192423.14943-25-dsafonov@virtuozzo.com
State Rejected
Series "x86 Compatible C/R, part 2"
Headers show

Commit Message

Dmitry Safonov June 28, 2016, 7:24 p.m.
I prefer this to be done in callee, than in caller for simplicity.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
---
 criu/arch/x86/call32.S | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/criu/arch/x86/call32.S b/criu/arch/x86/call32.S
index f2e118f266f1..bc724d6c5fae 100644
--- a/criu/arch/x86/call32.S
+++ b/criu/arch/x86/call32.S
@@ -34,6 +34,7 @@  call32_from_64:
 	pushfq
 
 	// Switch stacks
+	sub $8, %rdi
 	mov %rsp,(%rdi)
 	mov %rdi,%rsp
 
@@ -53,6 +54,7 @@  call32_from_64:
 1:
 	// Restore the stack
 	mov (%rsp),%rsp
+	add $8, %rdi
 
 	// Restore registers
 	popfq