summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2007-10-24 20:19:09 +0000
committermiod <miod@openbsd.org>2007-10-24 20:19:09 +0000
commitafd9cd082f0bd3ab2c5129671fb7b5686a2deec9 (patch)
treef6fb1b77801d4d9c87c18bfc1d206c84880c6433 /lib/libc
parentThe index should be unsigned int -- another lint finding (diff)
downloadwireguard-openbsd-afd9cd082f0bd3ab2c5129671fb7b5686a2deec9.tar.xz
wireguard-openbsd-afd9cd082f0bd3ab2c5129671fb7b5686a2deec9.zip
Change the syscall invocation sequences to no longer fetch the last few
arguments from the stack, since the kernel will now copyin() them when necessary. This makes all system calls (but mmap()) slightly faster. WARNING! After this commit, your binaries must run against a kernel featuring m88k/m88k/trap.c r1.34 or better - i.e. a 4.1 or later kernel.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/arch/m88k/SYS.h5
-rw-r--r--lib/libc/arch/m88k/sys/syscall.S5
2 files changed, 2 insertions, 8 deletions
diff --git a/lib/libc/arch/m88k/SYS.h b/lib/libc/arch/m88k/SYS.h
index 81cb2611ac6..14cd26e5ab7 100644
--- a/lib/libc/arch/m88k/SYS.h
+++ b/lib/libc/arch/m88k/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.11 2004/07/28 08:48:15 miod Exp $*/
+/* $OpenBSD: SYS.h,v 1.12 2007/10/24 20:19:09 miod Exp $*/
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -48,9 +48,6 @@
#endif
#define __DO_SYSCALL(x) \
- ld r10,r31,0; \
- ld r11,r31,4; \
- ld r12,r31,8; \
or r13,r0,__SYSCALLNAME(SYS_,x); \
tb0 0, r0, 128
diff --git a/lib/libc/arch/m88k/sys/syscall.S b/lib/libc/arch/m88k/sys/syscall.S
index a6cc5ceec73..477ba89cb01 100644
--- a/lib/libc/arch/m88k/sys/syscall.S
+++ b/lib/libc/arch/m88k/sys/syscall.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.S,v 1.9 2005/08/07 16:40:15 espie Exp $ */
+/* $OpenBSD: syscall.S,v 1.10 2007/10/24 20:19:11 miod Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -36,9 +36,6 @@
#include "SYS.h"
SYSENTRY(syscall)
- ld r10,r31,0
- ld r11,r31,4
- ld r12,r31,8
or r13,r0,0
tb0 0,r0,128
br __cerror