freebsd-skq/sys/i386/linux/linux_locore.s
marcel cde8d15963 o Change the argument of linux_sigreturn to be a pointer to a
struct sigframe. We need more than only the signal context.

o  Properly convert the signal mask when setting up the signal
   frame in linux_sendsig and properly convert it back in
   linux_sigreturn.

Do some cleanups and improve style while here.
2000-11-23 08:55:30 +00:00

37 lines
1.0 KiB
ArmAsm

/* $FreeBSD$ */
#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_GS(%ebx),%gs
movl %esp, %ebx /* pass sigframe */
push %eax /* fake ret addr */
movl $LINUX_SYS_linux_sigreturn,%eax /* linux_sigreturn() */
int $0x80 /* enter kernel with args */
0: jmp 0b
ALIGN_TEXT
/* XXXXX */
_linux_rt_sigcode:
call *LINUX_RT_SIGF_HANDLER(%esp)
leal LINUX_RT_SIGF_UC(%esp),%ebx /* linux ucp */
movl LINUX_SC_GS(%ebx),%gs
push %eax /* fake ret addr */
movl $LINUX_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */
int $0x80 /* enter kernel with args */
0: jmp 0b
ALIGN_TEXT
/* XXXXX */
_linux_esigcode:
.data
.globl _linux_szsigcode, _linux_sznonrtsigcode
_linux_szsigcode:
.long _linux_esigcode-_linux_sigcode
_linux_sznonrtsigcode:
.long _linux_rt_sigcode-_linux_sigcode