Kernel: Fix syscall return value in 32 bit

This commit is contained in:
Bananymous 2023-04-21 11:08:02 +03:00
parent be14a6c239
commit 3f2beb4547
1 changed files with 12 additions and 1 deletions

View File

@ -174,7 +174,18 @@ found:
"addl $16, %esp;"
"popw %es;"
"popw %ds;"
"popa;"
// NOTE: following instructions are same as in 'popa', except we skip eax
// since it holds the return value of the syscall.
"popl %edi;"
"popl %esi;"
"popl %ebp;"
"addl $4, %esp;"
"popl %ebx;"
"popl %edx;"
"popl %ecx;"
"addl $4, %esp;"
"iret;"
);