Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/mips/sys Since N32/N64 pass the first 8 argume...
details: https://anonhg.NetBSD.org/src/rev/a1f1d7001dca
branches: trunk
changeset: 326495:a1f1d7001dca
user: matt <matt%NetBSD.org@localhost>
date: Fri Jan 31 18:06:26 2014 +0000
description:
Since N32/N64 pass the first 8 arguments in registers, we can load all
the arguments into those registers before invoking the syscall having
the kernel syscall handler from having to do that.
diffstat:
lib/libc/arch/mips/sys/__syscall.S | 24 +++++++++++++++++++++++-
lib/libc/arch/mips/sys/syscall.S | 6 ++++--
2 files changed, 27 insertions(+), 3 deletions(-)
diffs (53 lines):
diff -r 1676319acbad -r a1f1d7001dca lib/libc/arch/mips/sys/__syscall.S
--- a/lib/libc/arch/mips/sys/__syscall.S Fri Jan 31 15:43:06 2014 +0000
+++ b/lib/libc/arch/mips/sys/__syscall.S Fri Jan 31 18:06:26 2014 +0000
@@ -1,5 +1,27 @@
-/* $NetBSD: __syscall.S,v 1.1 2000/12/13 23:18:40 simonb Exp $ */
+/* $NetBSD: __syscall.S,v 1.2 2014/01/31 18:06:26 matt Exp $ */
#include "SYS.h"
+#ifdef __mips_o32
RSYSCALL(__syscall)
+#else
+
+LEAF(__syscall)
+ PIC_PROLOGUE(__syscall)
+ move v0, a0
+ move a0, a1
+ move a1, a2
+ move a2, a3
+ move a3, a4
+ move a4, a5
+ move a5, a6
+ move a6, a7
+ REG_L a7, (sp)
+ SYSTRAP(__syscall)
+ bne a3,zero,1f
+ PIC_RETURN()
+1:
+ PIC_TAILCALL(__cerror)
+END(__syscall)
+STRONG_ALIAS(syscall, __syscall)
+#endif
diff -r 1676319acbad -r a1f1d7001dca lib/libc/arch/mips/sys/syscall.S
--- a/lib/libc/arch/mips/sys/syscall.S Fri Jan 31 15:43:06 2014 +0000
+++ b/lib/libc/arch/mips/sys/syscall.S Fri Jan 31 18:06:26 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.S,v 1.6 2009/12/14 01:07:42 matt Exp $ */
+/* $NetBSD: syscall.S,v 1.7 2014/01/31 18:06:26 matt Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -38,8 +38,10 @@
#if 0
RCSID("from: @(#)syscall.s 8.1 (Berkeley) 6/4/93")
#else
- RCSID("$NetBSD: syscall.S,v 1.6 2009/12/14 01:07:42 matt Exp $")
+ RCSID("$NetBSD: syscall.S,v 1.7 2014/01/31 18:06:26 matt Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
+#ifdef __mips_o32
RSYSCALL(syscall)
+#endif
Home |
Main Index |
Thread Index |
Old Index