summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-05-03 09:03:50 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-05-03 09:03:50 +0000
commit3472e7ae763d3e453e57b218243b6d60ece25b43 (patch)
treeb328660004108bf49bb793a37ea2f1424bda7514 /sys/arch
parent420f4f970e89e85a04687eac9b58a56b14e7fc5a (diff)
Use generic m68k sigreturn code from arch/m68k
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvme68k/mvme68k/locore.s39
1 files changed, 2 insertions, 37 deletions
diff --git a/sys/arch/mvme68k/mvme68k/locore.s b/sys/arch/mvme68k/mvme68k/locore.s
index 9dc6fc1008e..d1c7f67e0ef 100644
--- a/sys/arch/mvme68k/mvme68k/locore.s
+++ b/sys/arch/mvme68k/mvme68k/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.6 1996/04/28 10:57:27 deraadt Exp $ */
+/* $OpenBSD: locore.s,v 1.7 1996/05/03 09:03:49 niklas Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -978,42 +978,7 @@ _trace:
moveq #T_TRACE,d0
jra fault
-/*
- * The sigreturn() syscall comes here. It requires special handling
- * because we must open a hole in the stack to fill in the (possibly much
- * larger) original stack frame.
- */
-sigreturn:
- lea sp@(-84),sp | leave enough space for largest frame
- movl sp@(84),sp@ | move up current 8 byte frame
- movl sp@(88),sp@(4)
- movl #84,sp@- | default: adjust by 84 bytes
- moveml #0xFFFF,sp@- | save user registers
- movl usp,a0 | save the user SP
- movl a0,sp@(FR_SP) | in the savearea
- movl #SYS_sigreturn,sp@- | push syscall number
- jbsr _syscall | handle it
- addql #4,sp | pop syscall#
- movl sp@(FR_SP),a0 | grab and restore
- movl a0,usp | user SP
- lea sp@(FR_HW),a1 | pointer to HW frame
- movw sp@(FR_ADJ),d0 | do we need to adjust the stack?
- jeq Lsigr1 | no, just continue
- moveq #92,d1 | total size
- subw d0,d1 | - hole size = frame size
- lea a1@(92),a0 | destination
- addw d1,a1 | source
- lsrw #1,d1 | convert to word count
- subqw #1,d1 | minus 1 for dbf
-Lsigrlp:
- movw a1@-,a0@- | copy a word
- dbf d1,Lsigrlp | continue
- movl a0,a1 | new HW frame base
-Lsigr1:
- movl a1,sp@(FR_SP) | new SP value
- moveml sp@+,#0x7FFF | restore user registers
- movl sp@,sp | and our SP
- jra rei | all done
+#include <m68k/m68k/sigreturn.s>
/*
* Interrupt handlers.