- Use common mac68k sigcode.

- Garbage-collect icode; hasn't been used in eons.
This commit is contained in:
thorpej 1997-04-13 02:43:51 +00:00
parent f05b58b229
commit 2da8464bdf

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.76 1997/04/09 20:17:24 thorpej Exp $ */
/* $NetBSD: locore.s,v 1.77 1997/04/13 02:43:51 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -1061,60 +1061,9 @@ _proc_trampoline:
/*
* Icode is copied out to process 1 to exec init.
* If the exec fails, process 1 exits.
* Use common m68k sigcode.
*/
.globl _icode,_szicode
.text
_icode:
clrl sp@-
pea pc@((argv-.)-2)
pea pc@((init-.)-2)
clrl sp@-
moveq #SYS_execve,d0
trap #0
moveq #SYS_exit,d0
trap #0
init:
.asciz "/sbin/init"
.even
argv:
.long init+6-_icode | argv[0] = "init" ("/sbin/init" + 6)
.long eicode-_icode | argv[1] follows icode after copyout
.long 0
eicode:
_szicode:
.long _szicode-_icode
/*
* Signal "trampoline" code (18 bytes). Invoked from RTE setup by sendsig().
*
* Stack looks like:
*
* sp+0 -> signal number
* sp+4 signal specific code
* sp+8 pointer to signal context frame (scp)
* sp+12 address of handler
* sp+16 saved hardware state
* .
* .
* scp+0-> beginning of signal context frame
*/
.globl _sigcode, _esigcode
.data
.align 2
_sigcode:
movl sp@(12),a0 | signal handler addr (4 bytes)
jsr a0@ | call signal handler (2 bytes)
addql #4,sp | pop signo (2 bytes)
trap #1 | special syscall entry (2 bytes)
movl d0,sp@(4) | save errno (4 bytes)
moveq #1,d0 | syscall == exit (2 bytes)
trap #0 | exit(errno) (2 bytes)
.align 2
_esigcode:
#include <m68k/m68k/sigcode.s>
/*
* Primitives