Source-Changes-HG archive

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

[src/netbsd-3]: src/lib/libc/arch/sh3/sys Pull up following revision(s) (requ...



details:   https://anonhg.NetBSD.org/src/rev/4e055f4a2c18
branches:  netbsd-3
changeset: 577755:4e055f4a2c18
user:      tron <tron%NetBSD.org@localhost>
date:      Sun Jan 22 10:19:09 2006 +0000

description:
Pull up following revision(s) (requested by uwe in ticket #1101):
        lib/libc/arch/sh3/sys/cerror.S: revision 1.8
Use PLT for PIC call to __errno to avoid text reloc in the shared library.
Add .size directive.

diffstat:

 lib/libc/arch/sh3/sys/cerror.S |  28 ++++++++++++----------------
 1 files changed, 12 insertions(+), 16 deletions(-)

diffs (57 lines):

diff -r 552c36fb878d -r 4e055f4a2c18 lib/libc/arch/sh3/sys/cerror.S
--- a/lib/libc/arch/sh3/sys/cerror.S    Sun Jan 22 10:18:42 2006 +0000
+++ b/lib/libc/arch/sh3/sys/cerror.S    Sun Jan 22 10:19:09 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cerror.S,v 1.7 2004/05/28 23:39:09 uwe Exp $   */
+/*     $NetBSD: cerror.S,v 1.7.2.1 2006/01/22 10:19:09 tron Exp $      */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -36,7 +36,7 @@
 
 #include <machine/asm.h>
 #if defined(SYSLIBC_SCCS) && !defined(lint)
-       RCSID("$NetBSD: cerror.S,v 1.7 2004/05/28 23:39:09 uwe Exp $")
+       RCSID("$NetBSD: cerror.S,v 1.7.2.1 2006/01/22 10:19:09 tron Exp $")
 #endif /* SYSLIBC_SCCS and not lint */
 
 #include "SYS.h"
@@ -48,28 +48,24 @@
 
        .align  2
 cerror:
-       mov.l   L__errno, r1
+       mov.l   .L___errno, r1
+       mov.l   r0, @-sp        ! save error code
+       PIC_PROLOGUE(.L_got)
        sts.l   pr, @-sp
-#ifdef PIC
-1:     bsrf    r1
-#else
-       jsr     @r1
-#endif
-        mov.l  r0, @-sp        ! save error code
+1:     CALL    r1
+        nop
+       lds.l   @sp+, pr
+       PIC_EPILOGUE
        mov.l   @sp+, r2        ! restore error code
-       lds.l   @sp+, pr
        mov.l   r2, @r0
        mov     #-1, r1
        rts
         mov    #-1, r0
 
        .align  2
-L__errno:
-#ifdef PIC
-       .long   _C_LABEL(__errno) - (1b + 4)
-#else
-       .long   _C_LABEL(__errno)
-#endif
+.L_got:                PIC_GOT_DATUM
+.L___errno:    CALL_DATUM(_C_LABEL(__errno), 1b)
+       SET_ASENTRY_SIZE(cerror)
 
 #else /* !_REENTRANT */
 



Home | Main Index | Thread Index | Old Index