mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-04 00:05:26 +00:00
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: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
75281003bd
commit
b1cc99844f
@@ -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:
|
|||||||
1:
|
1:
|
||||||
// Restore the stack
|
// Restore the stack
|
||||||
mov (%rsp),%rsp
|
mov (%rsp),%rsp
|
||||||
|
add $8, %rdi
|
||||||
|
|
||||||
// Restore registers
|
// Restore registers
|
||||||
popfq
|
popfq
|
||||||
|
Reference in New Issue
Block a user