Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/powerpc/sys Since powerpc passes 8 arguments i...
details: https://anonhg.NetBSD.org/src/rev/07b0f57b8af8
branches: trunk
changeset: 326537:07b0f57b8af8
user: matt <matt%NetBSD.org@localhost>
date: Sat Feb 01 20:26:21 2014 +0000
description:
Since powerpc passes 8 arguments in registers and the syscall number in r0,
shuffle register argument so the kernel won't need to access the stack to
retrieve that last argument.
diffstat:
lib/libc/arch/powerpc/sys/__syscall.S | 23 ++++++++++++++++++++---
lib/libc/arch/powerpc/sys/syscall.S | 6 ++----
2 files changed, 22 insertions(+), 7 deletions(-)
diffs (40 lines):
diff -r 388b9b6734e2 -r 07b0f57b8af8 lib/libc/arch/powerpc/sys/__syscall.S
--- a/lib/libc/arch/powerpc/sys/__syscall.S Sat Feb 01 20:07:07 2014 +0000
+++ b/lib/libc/arch/powerpc/sys/__syscall.S Sat Feb 01 20:26:21 2014 +0000
@@ -1,5 +1,22 @@
-/* $NetBSD: __syscall.S,v 1.1 2000/12/13 07:50:48 matt Exp $ */
+/* $NetBSD: __syscall.S,v 1.2 2014/02/01 20:26:21 matt Exp $ */
+
+#include <powerpc/asm.h>
-#include "SYS.h"
+ .text
+ .align 2
+ENTRY(__syscall)
+ mr %r0,%r3 /* syscall number */
+ mr %r3,%r4
+ mr %r4,%r5
+ mr %r5,%r6
+ mr %r6,%r7
+ mr %r7,%r8
+ mr %r8,%r9
+ mr %r9,%r10
+ lwz %r10,8(%r1) /* final argument is on the stack */
+ sc
+ bnslr
+ b _C_LABEL(__cerror)
+END(__syscall)
-RSYSCALL(__syscall)
+STRONG_ALIAS(syscall, __syscall)
diff -r 388b9b6734e2 -r 07b0f57b8af8 lib/libc/arch/powerpc/sys/syscall.S
--- a/lib/libc/arch/powerpc/sys/syscall.S Sat Feb 01 20:07:07 2014 +0000
+++ b/lib/libc/arch/powerpc/sys/syscall.S Sat Feb 01 20:26:21 2014 +0000
@@ -1,5 +1,3 @@
-/* $NetBSD: syscall.S,v 1.2 1998/05/25 15:28:04 ws Exp $ */
+/* $NetBSD: syscall.S,v 1.3 2014/02/01 20:26:21 matt Exp $ */
-#include "SYS.h"
-
-RSYSCALL(syscall)
+/* aliased to __syscall */
Home |
Main Index |
Thread Index |
Old Index