From 29f38d943a5f786d58b029835560e4c3cb25cd80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Thu, 28 Dec 2023 23:18:17 +0000 Subject: [PATCH] Just in case make sure to save and restore more registers. --- posix-runner/posix-runner.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/posix-runner/posix-runner.c b/posix-runner/posix-runner.c index 1a9aab8..aa95155 100644 --- a/posix-runner/posix-runner.c +++ b/posix-runner/posix-runner.c @@ -90,6 +90,10 @@ void entry_syscall() asm("push_rcx" "push_rbx" "push_rbp" + "push_r12" + "push_r13" + "push_r14" + "push_r15" ); asm("mov_rbp,rsp" "push_rax" @@ -109,7 +113,11 @@ void entry_syscall() "pop_rbx" /* rax is return code, do not overwrite it */ ); /* Restore registers */ - asm("pop_rbp" + asm("pop_r15" + "pop_r14" + "pop_r13" + "pop_r12" + "pop_rbp" "pop_rbx" "pop_rcx" );