Commit b1cc9984 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

x86/call32: reserve space for saving 64-bit sp on 32-bit stack

I prefer this to be done in callee, than in caller for simplicity.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 75281003
...@@ -34,6 +34,7 @@ call32_from_64: ...@@ -34,6 +34,7 @@ call32_from_64:
pushfq pushfq
// Switch stacks // Switch stacks
sub $8, %rdi
mov %rsp,(%rdi) mov %rsp,(%rdi)
mov %rdi,%rsp mov %rdi,%rsp
...@@ -53,6 +54,7 @@ call32_from_64: ...@@ -53,6 +54,7 @@ call32_from_64:
1: 1:
// Restore the stack // Restore the stack
mov (%rsp),%rsp mov (%rsp),%rsp
add $8, %rdi
// Restore registers // Restore registers
popfq popfq
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment