1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

Kernel: Simplify kernel entry points slightly

It was silly to push the address of the stack pointer when we can also
just change the callee argument to be a value type.
This commit is contained in:
Andreas Kling 2019-11-06 13:15:55 +01:00
parent 349d2ec1c2
commit 9a4b117f48
Notes: sideshowbarker 2024-07-19 11:21:19 +09:00
3 changed files with 38 additions and 46 deletions

View file

@ -6,7 +6,7 @@
#include <Kernel/Scheduler.h>
#include <Kernel/Syscall.h>
extern "C" void syscall_trap_entry(RegisterDump&);
extern "C" void syscall_trap_entry(RegisterDump);
extern "C" void syscall_trap_handler();
extern volatile RegisterDump* syscallRegDump;
@ -28,9 +28,7 @@ asm(
" popw %es\n"
" popw %fs\n"
" popw %gs\n"
" pushl %esp\n"
" call syscall_trap_entry\n"
" add $4, %esp\n"
" popw %gs\n"
" popw %gs\n"
" popw %fs\n"
@ -329,7 +327,7 @@ static u32 handle(RegisterDump& regs, u32 function, u32 arg1, u32 arg2, u32 arg3
}
void syscall_trap_entry(RegisterDump& regs)
void syscall_trap_entry(RegisterDump regs)
{
current->process().big_lock().lock();
u32 function = regs.eax;