diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/init/syscall.s | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/init/syscall.s b/src/init/syscall.s index 86d3523..78ce817 100644 --- a/src/init/syscall.s +++ b/src/init/syscall.s @@ -2,12 +2,20 @@ .global _syscall .type _syscall, @function _syscall: - mov 4(%esp), %eax - mov 8(%esp), %ebx + push %ebx // preserve registers + push %esi + push %edi + +// note: i could squeeze out another parameter out of %ebp + mov 16(%esp), %eax + mov 20(%esp), %ebx mov %esp, %ecx mov $_syscall_ret, %edx - mov 12(%esp), %esi - mov 16(%esp), %edi + mov 24(%esp), %esi + mov 28(%esp), %edi sysenter _syscall_ret: + pop %edi + pop %esi + pop %ebx ret |