diff options
author | dzwdz | 2021-07-21 21:35:20 +0200 |
---|---|---|
committer | dzwdz | 2021-07-21 21:35:20 +0200 |
commit | 8a168f2be5d90f972975abf0b40145a75c0231b7 (patch) | |
tree | cdfcd84a132a6a9864b01b626cc670e9caf7c4ef /src/init/syscall.s | |
parent | 36089d20ca1f7c57f36c4172759a5084bdf87a3a (diff) |
syscall parameter & return value passing
Sadly, sysenter on i386 limits me to only 4 arguments (so, 1 for the
syscall id + 3 real args). If that turns out to be an issue I'll either
just switch to interrupts, or switch to x64.
Diffstat (limited to 'src/init/syscall.s')
-rw-r--r-- | src/init/syscall.s | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/init/syscall.s b/src/init/syscall.s index ebd9d0e..86d3523 100644 --- a/src/init/syscall.s +++ b/src/init/syscall.s @@ -2,8 +2,12 @@ .global _syscall .type _syscall, @function _syscall: + mov 4(%esp), %eax + mov 8(%esp), %ebx mov %esp, %ecx mov $_syscall_ret, %edx + mov 12(%esp), %esi + mov 16(%esp), %edi sysenter _syscall_ret: ret |