svr4_locore.s revision 43706
1#include "svr4_assym.h" /* system definitions */ 2#include <machine/asmacros.h> /* miscellaneous asm macros */ 3 4#include <svr4/svr4_syscall.h> /* system call numbers */ 5 6NON_GPROF_ENTRY(svr4_sigcode) 7 call SVR4_SIGF_HANDLER(%esp) 8 leal SVR4_SIGF_UC(%esp),%eax # ucp (the call may have clobbered the 9 # copy at SIGF_UCP(%esp)) 10#if defined(NOTYET) 11#ifdef VM86 12 testl $PSL_VM,SVR4_UC_EFLAGS(%eax) 13 jnz 1f 14#endif 15#endif 16 movl SVR4_UC_FS(%eax),%ecx 17 movl SVR4_UC_GS(%eax),%edx 18 movl %cx,%fs 19 movl %dx,%gs 20#if defined(__NetBSD__) 211: pushl %eax 22 pushl $1 # setcontext(p) == syscontext(1, p) 23 pushl %eax # junk to fake return address 24 movl $_svr4_sys_context,%eax 25#else 26/* must be FreeBSD, right? */ 271: pushl %eax # fake return address 28 pushl $1 # pointer to ucontext 29 movl $_svr4_sys_context,%eax 30#endif 31 int $0x80 # enter kernel with args on stack 32 movl $exit,%eax 33 int $0x80 # exit if sigreturn fails 34 35 .align 2 /* long word align */ 36svr4_esigcode: 37 38 .data 39 .globl _svr4_szsigcode 40_svr4_szsigcode: 41 .long svr4_esigcode - _svr4_sigcode 42 43 .text 44 45