Module Name: src
Committed By: matt
Date: Fri Jan 31 18:06:26 UTC 2014
Modified Files:
src/lib/libc/arch/mips/sys: __syscall.S syscall.S
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/mips/sys/__syscall.S
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/mips/sys/syscall.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/arch/mips/sys/__syscall.S
diff -u src/lib/libc/arch/mips/sys/__syscall.S:1.1 src/lib/libc/arch/mips/sys/__syscall.S:1.2
--- src/lib/libc/arch/mips/sys/__syscall.S:1.1 Wed Dec 13 23:18:40 2000
+++ src/lib/libc/arch/mips/sys/__syscall.S Fri Jan 31 18:06:26 2014
@@ -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
Index: src/lib/libc/arch/mips/sys/syscall.S
diff -u src/lib/libc/arch/mips/sys/syscall.S:1.6 src/lib/libc/arch/mips/sys/syscall.S:1.7
--- src/lib/libc/arch/mips/sys/syscall.S:1.6 Mon Dec 14 01:07:42 2009
+++ src/lib/libc/arch/mips/sys/syscall.S Fri Jan 31 18:06:26 2014
@@ -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