Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/lib/libc/arch/powerpc/sys Pull up revision 1.5 (request...



details:   https://anonhg.NetBSD.org/src/rev/191979968ac9
branches:  netbsd-1-4
changeset: 470267:191979968ac9
user:      he <he%NetBSD.org@localhost>
date:      Wed Feb 02 23:31:07 2000 +0000

description:
Pull up revision 1.5 (requested by kleink):
  Implement *__errno() indirection.

diffstat:

 lib/libc/arch/powerpc/sys/cerror.S |  23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r 10eb9027975b -r 191979968ac9 lib/libc/arch/powerpc/sys/cerror.S
--- a/lib/libc/arch/powerpc/sys/cerror.S        Wed Feb 02 23:29:26 2000 +0000
+++ b/lib/libc/arch/powerpc/sys/cerror.S        Wed Feb 02 23:31:07 2000 +0000
@@ -1,12 +1,26 @@
-/*     $NetBSD: cerror.S,v 1.4 1999/01/14 22:48:21 kleink Exp $        */
+/*     $NetBSD: cerror.S,v 1.4.2.1 2000/02/02 23:31:07 he Exp $        */
 
 #include <machine/asm.h>
 #include "SYS.h"
 
-/* XXX _REENTRANT */
+#ifndef _REENTRANT
+       .globl  _C_LABEL(errno)
+#endif
 
-       .globl  _C_LABEL(errno)
 ENTRY(__cerror)
+#ifdef _REENTRANT
+       mflr    0
+       stwu    1,-16(1)                # allocate new stack frame
+       stw     0,20(1)
+       stw     31,8(1)
+       mr      31,3                    # stash away in callee-saved register
+       bl      PIC_PLT(_C_LABEL(__errno))
+       stw     31,0(3)
+       lwz     0,20(1)
+       lwz     31,8(1)
+       mtlr    0
+       la      1,16(1)
+#else
 #ifdef PIC
        mflr    10
        bl      _GLOBAL_OFFSET_TABLE_@local-4
@@ -17,7 +31,8 @@
 #else
        lis     4,_C_LABEL(errno)@ha
        stw     3,_C_LABEL(errno)@l(4)
-#endif
+#endif /* PIC */
+#endif /* _REENTRANT */
        li      3,-1
        li      4,-1
        blr



Home | Main Index | Thread Index | Old Index