svr4_locore.s revision 43412
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/*	.globl	_svr4_esigcode*/
36
37	.align	2				/* long word align */
38svr4_esigcode:
39
40	.data
41	.globl	svr4_szsigcode
42svr4_szsigcode:
43	.long	svr4_esigcode - svr4_sigcode
44
45	.text
46
47