Kernel: Implement signal trampoline for i386
This commit is contained in:
29
kernel/arch/i386/Signal.S
Normal file
29
kernel/arch/i386/Signal.S
Normal 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
|
||||
Reference in New Issue
Block a user