Fix the bug that the modified version of __syscall6() messes up the stack by poping an argument (a6)

This commit is contained in:
Ziyao 2022-04-03 09:52:17 +08:00
parent 498d111c93
commit 5013f777b5
1 changed files with 3 additions and 1 deletions

View File

@ -45,6 +45,8 @@ __syscall6:
movq %rcx, %rdx
movq %r8, %r10
movq %r9, %r8
popq %r9 // The last argument is stored on the stack
movq (%rsp), %r9 // The last argument is stored on
// the stack
// But do NOT mess up the stack
syscall
retq