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 For consistency with all other por...
details: https://anonhg.NetBSD.org/src/rev/0801dff804bf
branches: trunk
changeset: 482857:0801dff804bf
user: kleink <kleink%NetBSD.org@localhost>
date: Wed Feb 23 20:16:57 2000 +0000
description:
For consistency with all other ports, clear errno in the prologue to the
syscall here as well - while the manual page advises applications to clear
errno themselves their actual behaviour may be questionable, especially in
light of the other ports' implementations.
diffstat:
lib/libc/arch/powerpc/sys/ptrace.S | 45 ++++++++++++++++++++++++++++++++++++-
1 files changed, 43 insertions(+), 2 deletions(-)
diffs (52 lines):
diff -r 949a3b8c74b7 -r 0801dff804bf lib/libc/arch/powerpc/sys/ptrace.S
--- a/lib/libc/arch/powerpc/sys/ptrace.S Wed Feb 23 18:50:51 2000 +0000
+++ b/lib/libc/arch/powerpc/sys/ptrace.S Wed Feb 23 20:16:57 2000 +0000
@@ -1,5 +1,46 @@
-/* $NetBSD: ptrace.S,v 1.2 1998/05/25 15:28:03 ws Exp $ */
+/* $NetBSD: ptrace.S,v 1.3 2000/02/23 20:16:57 kleink Exp $ */
#include "SYS.h"
-RSYSCALL(ptrace)
+ENTRY(ptrace)
+#ifdef _REENTRANT
+ mflr 0
+ stwu 1,-32(1)
+ stw 0,36(1)
+ stw 3,8(1)
+ stw 4,12(1)
+ stw 5,16(1)
+ stw 6,20(1)
+
+ bl PIC_PLT(_C_LABEL(__errno))
+ li 7,0
+ stw 7,0(3)
+
+ lwz 3,8(1)
+ lwz 4,12(1)
+ lwz 5,16(1)
+ lwz 0,36(1)
+ lwz 6,20(1)
+ mtlr 0
+ la 1,32(1)
+#else
+#ifdef PIC
+ mflr 0
+ bl _GLOBAL_OFFSET_TABLE_@local-4
+ mflr 7
+ lwz 7,_C_LABEL(errno)@got(7)
+ li 8,0
+ stw 8,0(7)
+ mtlr 0
+#else
+ lis 7,_C_LABEL(errno)@ha
+ li 8,0
+ stw 8,_C_LABEL(errno)@l(7)
+#endif /* PIC */
+#endif /* _REENTRANT */
+ li 0,SYS_ptrace
+ sc
+ bso 1f
+ blr
+1:
+ b PIC_PLT(_C_LABEL(__cerror))
Home |
Main Index |
Thread Index |
Old Index