1999-01-30 06:29:48 +00:00
|
|
|
#include "svr4_assym.h" /* system definitions */
|
|
|
|
#include <machine/asmacros.h> /* miscellaneous asm macros */
|
|
|
|
|
|
|
|
#include <svr4/svr4_syscall.h> /* system call numbers */
|
|
|
|
|
|
|
|
NON_GPROF_ENTRY(svr4_sigcode)
|
|
|
|
call SVR4_SIGF_HANDLER(%esp)
|
|
|
|
leal SVR4_SIGF_UC(%esp),%eax # ucp (the call may have clobbered the
|
|
|
|
# copy at SIGF_UCP(%esp))
|
|
|
|
#if defined(NOTYET)
|
1999-06-02 15:35:46 +00:00
|
|
|
#ifdef VM86
|
1999-01-30 06:29:48 +00:00
|
|
|
testl $PSL_VM,SVR4_UC_EFLAGS(%eax)
|
|
|
|
jnz 1f
|
1999-06-02 15:35:46 +00:00
|
|
|
#endif
|
1999-01-30 06:29:48 +00:00
|
|
|
#endif
|
|
|
|
movl SVR4_UC_GS(%eax),%edx
|
|
|
|
movl %dx,%gs
|
|
|
|
#if defined(__NetBSD__)
|
1999-04-28 01:04:33 +00:00
|
|
|
movl SVR4_UC_FS(%eax),%ecx
|
|
|
|
movl %cx,%fs
|
1999-01-30 06:29:48 +00:00
|
|
|
1: pushl %eax
|
|
|
|
pushl $1 # setcontext(p) == syscontext(1, p)
|
|
|
|
pushl %eax # junk to fake return address
|
|
|
|
movl $_svr4_sys_context,%eax
|
|
|
|
#else
|
|
|
|
/* must be FreeBSD, right? */
|
|
|
|
1: pushl %eax # fake return address
|
|
|
|
pushl $1 # pointer to ucontext
|
1999-02-06 08:41:06 +00:00
|
|
|
movl $_svr4_sys_context,%eax
|
1999-01-30 06:29:48 +00:00
|
|
|
#endif
|
|
|
|
int $0x80 # enter kernel with args on stack
|
|
|
|
movl $exit,%eax
|
|
|
|
int $0x80 # exit if sigreturn fails
|
|
|
|
|
|
|
|
.align 2 /* long word align */
|
|
|
|
svr4_esigcode:
|
|
|
|
|
|
|
|
.data
|
1999-02-06 08:41:06 +00:00
|
|
|
.globl _svr4_szsigcode
|
|
|
|
_svr4_szsigcode:
|
|
|
|
.long svr4_esigcode - _svr4_sigcode
|
1999-01-30 06:29:48 +00:00
|
|
|
|
|
|
|
.text
|
|
|
|
|