Subject: trap #3
To: None <port-m68k@netbsd.org>
From: ITOH Yasufumi <yasufu-i@is.aist-nara.ac.jp>
List: port-m68k
Date: 02/11/1999 07:07:03
Hello,
I'm going to commit this to allow future reuse of trap #3.
Any objections/comments?
I think this change must be done (if done) before 1.4 cutoff.
I gave up using d0, which makes it difficult to upgrade from -current,
but use a0 instead for syscall #.
The kernel code for checking the syscall # is missing for now.
Regards,
--
ITOH, Yasufumi <yasufu-i@is.aist-nara.ac.jp>, <itohy@netbsd.org>
diff -u lib/libc/arch/m68k/sys/__sigreturn14.S.orig lib/libc/arch/m68k/sys/__sigreturn14.S
--- lib/libc/arch/m68k/sys/__sigreturn14.S.orig Wed Feb 10 02:12:33 1999
+++ lib/libc/arch/m68k/sys/__sigreturn14.S Thu Feb 11 05:50:10 1999
@@ -59,5 +59,6 @@
#endif /* GPROF */
ENTRY(__sigreturn14)
+ lea SYS___sigreturn14,a0
trap #3 /* special sigreturn syscall entry point */
jra CERROR
diff -u sys/arch/m68k/m68k/sigcode.s.orig sys/arch/m68k/m68k/sigcode.s
--- sys/arch/m68k/m68k/sigcode.s.orig Sat Jan 9 23:24:39 1999
+++ sys/arch/m68k/m68k/sigcode.s Thu Feb 11 06:59:52 1999
@@ -71,6 +71,7 @@
movl sp@(12),a0 | signal handler addr (4 bytes)
jsr a0@ | call signal handler (2 bytes)
addql #4,sp | pop signal number (2 bytes)
+ lea SYS___sigreturn14,a0 | syscall == __sigreturn14 (4 bytes)
trap #3 | special sigreturn trap (2 bytes)
movl d0,sp@(4) | save errno (4 bytes)
moveq #SYS_exit,d0 | syscall == exit (2 bytes)