In the syscall vector, deal with SYS_lwp_getprivate quickly. XXX what about

non-NetBSD syscall tables.
This commit is contained in:
matt 2012-02-02 18:31:41 +00:00
parent 1336116b2f
commit c583175773
2 changed files with 13 additions and 16 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: genassym.cf,v 1.50 2011/04/14 08:17:42 matt Exp $
# $NetBSD: genassym.cf,v 1.51 2012/02/02 18:31:41 matt Exp $
#
# Copyright (c) 1997 Ludd, University of Lule}, Sweden.
# All rights reserved.
@ -150,6 +150,7 @@ define EV_COUNT offsetof(struct evcnt, ev_count)
define SYS_compat_16___sigreturn14 SYS_compat_16___sigreturn14
define SYS_exit SYS_exit
define SYS__lwp_getprivate SYS__lwp_getprivate
define VAX_TYP_UV2 VAX_TYP_UV2
define VAX_TYP_8SS VAX_TYP_8SS

View File

@ -1,4 +1,4 @@
/* $NetBSD: intvec.S,v 1.20 2011/04/12 18:07:57 matt Exp $ */
/* $NetBSD: intvec.S,v 1.21 2012/02/02 18:31:41 matt Exp $ */
/*
* Copyright (c) 1994, 1997 Ludd, University of Lule}, Sweden.
@ -107,7 +107,7 @@ _C_LABEL(rpb):
INTVEC(syscall, KSTACK) # main syscall trap, chmk, 40
INTVEC(chmx, KSTACK) # chme, 44
INTVEC(chmx, KSTACK) # chms, 48
INTVEC(chmu, KSTACK) # chmu, 4C
INTVEC(chmx, KSTACK) # chmu, 4C
NOVEC; # System Backplane Exception/BIerror, 50
INTVEC(cmrerr, ISTACK) # Corrected Memory Read, 54
NOVEC; # System Backplane Alert/RXCD, 58
@ -223,19 +223,6 @@ SCBENTRY(privinflt) # Privileged/unimplemented instruction
TRAPCALL(resopflt, T_RESOPFLT)
TRAPCALL(resadflt, T_RESADFLT)
/*
* Use chmu to implement a "fast" _lwp_getprivate.
*/
SCBENTRY(chmu)
cmpl (%sp), $1
bneq 1f
mfpr $PR_SSP, %r0 # get curlwp
movl L_PRIVATE(%r0), %r0 # get l_private
addl2 %sp, 4
rei
1:
brw Xchmx
/*
* default handler for CHME and CHMS
*/
@ -284,6 +271,15 @@ TRAPCALL(breakp, T_BPTFLT)
TRAPARGC(arithflt, T_ARITHFLT)
SCBENTRY(syscall) # Main system call
#if 1
cmpl (%sp), $SYS__lwp_getprivate
bneq 1f
mfpr $PR_SSP, %r0 # get curlwp
movl L_PRIVATE(%r0), %r0 # get l_private
addl2 $4, %sp # eat the code
rei
1:
#endif
pushl $T_SYSCALL
pushr $0xfff
mfpr $PR_USP, -(%sp)