diff --git a/src/internal/x86_64/syscall.S b/src/internal/x86_64/syscall.S index c3ba2b6..c614c73 100644 --- a/src/internal/x86_64/syscall.S +++ b/src/internal/x86_64/syscall.S @@ -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