diff options
Diffstat (limited to 'sys/i386/linux/linux_locore.s')
-rw-r--r-- | sys/i386/linux/linux_locore.s | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/i386/linux/linux_locore.s b/sys/i386/linux/linux_locore.s new file mode 100644 index 0000000..1440218 --- /dev/null +++ b/sys/i386/linux/linux_locore.s @@ -0,0 +1,26 @@ +#include "linux_assym.h" /* system definitions */ +#include <machine/asmacros.h> /* miscellaneous asm macros */ + +#include <i386/linux/linux_syscall.h> /* system call numbers */ + +NON_GPROF_ENTRY(linux_sigcode) + call LINUX_SIGF_HANDLER(%esp) + leal LINUX_SIGF_SC(%esp),%ebx /* linux scp */ + movl LINUX_SC_FS(%ebx),%ecx + movl LINUX_SC_GS(%ebx),%edx + movl %cx,%fs + movl %dx,%gs + push %eax /* fake ret addr */ + movl $LINUX_SYS_linux_sigreturn,%eax /* linux_sigreturn() */ + int $0x80 /* enter kernel with args on stack */ + hlt /* never gets here */ + + .align 2 /* long word align */ +_linux_esigcode: + + .data + .globl _linux_szsigcode +_linux_szsigcode: + .long _linux_esigcode-_linux_sigcode + + .text |