Add back x86_32 support #5

Merged
Bananymous merged 46 commits from x86_32 into main 2024-04-03 02:36:29 +03:00
2 changed files with 30 additions and 0 deletions
Showing only changes of commit 26585bb1d9 - Show all commits

View File

@ -125,6 +125,7 @@ elseif("${BANAN_ARCH}" STREQUAL "i386")
${KERNEL_SOURCES} ${KERNEL_SOURCES}
arch/i386/boot.S arch/i386/boot.S
arch/i386/PageTable.cpp arch/i386/PageTable.cpp
arch/i386/Signal.S
arch/i386/Syscall.S arch/i386/Syscall.S
arch/i386/Thread.S arch/i386/Thread.S
) )

29
kernel/arch/i386/Signal.S Normal file
View File

@ -0,0 +1,29 @@
.section .userspace, "aw"
// stack contains
// return address
// signal number
// signal handler
.global signal_trampoline
signal_trampoline:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
pusha
movl 40(%esp), %edi
movl 36(%esp), %eax
subl $12, %esp
pushl %edi
call *%eax
addl $16, %esp
popa
leave
addl $8, %esp
ret