Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/arch/vax Make these work with either a.out or ELF.



details:   https://anonhg.NetBSD.org/src/rev/c26144dd1a86
branches:  trunk
changeset: 493995:c26144dd1a86
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Jun 28 19:20:16 2000 +0000

description:
Make these work with either a.out or ELF.

diffstat:

 lib/libc/arch/vax/SYS.h               |  14 +++++++++++---
 lib/libc/arch/vax/gen/__setjmp14.S    |  10 +++++-----
 lib/libc/arch/vax/gen/__sigsetjmp14.S |  10 +++++-----
 lib/libc/arch/vax/gen/_setjmp.S       |   9 +++------
 lib/libc/arch/vax/gen/ldexp.S         |   8 ++++----
 lib/libc/arch/vax/gen/setjmp.S        |  10 +++++-----
 lib/libc/arch/vax/gen/sigsetjmp.S     |  10 +++++-----
 lib/libc/arch/vax/sys/Ovfork.S        |   6 +++---
 lib/libc/arch/vax/sys/__sigreturn14.S |   6 ++----
 lib/libc/arch/vax/sys/__vfork14.S     |   6 +++---
 lib/libc/arch/vax/sys/brk.S           |  16 +++++++---------
 lib/libc/arch/vax/sys/cerror.S        |  10 +++++-----
 lib/libc/arch/vax/sys/exect.S         |   4 ++--
 lib/libc/arch/vax/sys/ptrace.S        |   8 ++++----
 lib/libc/arch/vax/sys/sbrk.S          |  24 ++++++++++++------------
 lib/libc/arch/vax/sys/setlogin.S      |   6 +++---
 lib/libc/arch/vax/sys/sigprocmask.S   |  11 +++++------
 lib/libc/arch/vax/sys/sigreturn.S     |   5 ++---
 lib/libc/arch/vax/sys/sigsuspend.S    |  10 ++++------
 lib/libc/arch/vax/sys/syscall.S       |   4 ++--
 20 files changed, 92 insertions(+), 95 deletions(-)

diffs (truncated from 593 to 300 lines):

diff -r d9203b2b01fd -r c26144dd1a86 lib/libc/arch/vax/SYS.h
--- a/lib/libc/arch/vax/SYS.h   Wed Jun 28 17:32:48 2000 +0000
+++ b/lib/libc/arch/vax/SYS.h   Wed Jun 28 19:20:16 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: SYS.h,v 1.5 1998/10/20 06:46:19 matt Exp $ */
+/*     $NetBSD: SYS.h,v 1.6 2000/06/28 19:20:16 matt Exp $ */
 /*
  * Copyright (c) 1983, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -48,7 +48,7 @@
        SYSTRAP(y)
 
 #define _SYSCALL(x,y)                                                  \
-       err: nop; nop; jmp cerror+2;                                    \
+       err: nop; nop; jmp CERROR+2;                                    \
        _SYSCALL_NOERROR(x,y);                                          \
        jcs err+2
 
@@ -74,4 +74,12 @@
 
 #define        ASMSTR          .asciz
 
-       .globl  cerror
+#ifdef __ELF__
+#define        CERROR  _C_LABEL(__cerror)
+#define        CURBRK  _C_LABEL(__curbrk)
+#else
+#define        CERROR  _ASM_LABEL(cerror)
+#define        CURBRK  _ASM_LABEL(curbrk)
+#endif
+
+       .globl  CERROR
diff -r d9203b2b01fd -r c26144dd1a86 lib/libc/arch/vax/gen/__setjmp14.S
--- a/lib/libc/arch/vax/gen/__setjmp14.S        Wed Jun 28 17:32:48 2000 +0000
+++ b/lib/libc/arch/vax/gen/__setjmp14.S        Wed Jun 28 19:20:16 2000 +0000
@@ -33,7 +33,7 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
        /* .asciz "@(#)setjmp.s 8.1 (Berkeley) 6/4/93" */
-       .asciz "$NetBSD: __setjmp14.S,v 1.3 1998/10/10 01:50:23 matt Exp $"
+       .asciz "$NetBSD: __setjmp14.S,v 1.4 2000/06/28 19:20:17 matt Exp $"
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -54,12 +54,12 @@
        subl2   $12,sp                  # space for current struct sigstack
        pushl   sp                      # get current values
        pushl   $0                      # no new values
-       calls   $4,___sigaltstack14     # pop args plus signal stack value
+       calls   $4,_C_LABEL(__sigaltstack14) # pop args plus signal stack value
        movl    (sp)+,(r6)+             # save onsigstack status of caller
        pushal  24(r6)
        pushl   $0
        pushl   $0
-       calls   $3,___sigprocmask14     # get signal mask
+       calls   $3,_C_LABEL(__sigprocmask14) # get signal mask
        addl2   $4,r6                   # skip old mask
        movl    (ap),r0
        moval   4(ap)[r0],(r6)+         # save sp of caller
@@ -92,8 +92,8 @@
 
 done:
        pushl   r1                      # pointer to sigcontext
-       calls   $1,___sigreturn14       # restore previous context
+       calls   $1,_C_LABEL(__sigreturn14) # restore previous context
                                        # we should never return
 botch:
-       calls   $0,_longjmperror
+       calls   $0,_C_LABEL(longjmperror)
        halt
diff -r d9203b2b01fd -r c26144dd1a86 lib/libc/arch/vax/gen/__sigsetjmp14.S
--- a/lib/libc/arch/vax/gen/__sigsetjmp14.S     Wed Jun 28 17:32:48 2000 +0000
+++ b/lib/libc/arch/vax/gen/__sigsetjmp14.S     Wed Jun 28 19:20:16 2000 +0000
@@ -32,7 +32,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-       .asciz "$NetBSD: __sigsetjmp14.S,v 1.1 1998/10/01 18:59:16 christos Exp $"
+       .asciz "$NetBSD: __sigsetjmp14.S,v 1.2 2000/06/28 19:20:17 matt Exp $"
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -55,14 +55,14 @@
        movl    8(ap),(_JBLEN*4)(r0)    # save "savemask"
        tstl    8(ap)                   # do saving of signal mask?
        beql    L1
-       jmp     ___setjmp14+2           # yep, do full setjmp
-L1:    jmp     __setjmp+2              # nope, skip to _setjmp
+       jmp     _C_LABEL(__setjmp14)+2  # yep, do full setjmp
+L1:    jmp     _C_LABEL(_setjmp)+2     # nope, skip to _setjmp
 
 ENTRY(__siglongjmp14, 0)
        movl    4(ap),r0                # get env pointer
        tstl    (_JBLEN*4)(r0)          # test if "savemask" was set
        beql    L2
-       jmp     ___longjmp14+2          # yep, do full longjmp
-L2:    jmp     __longjmp+2             # nope, skip to _longjmp
+       jmp     _C_LABEL(__longjmp14)+2 # yep, do full longjmp
+L2:    jmp     _C_LABEL(_longjmp)+2    # nope, skip to _longjmp
 
 
diff -r d9203b2b01fd -r c26144dd1a86 lib/libc/arch/vax/gen/_setjmp.S
--- a/lib/libc/arch/vax/gen/_setjmp.S   Wed Jun 28 17:32:48 2000 +0000
+++ b/lib/libc/arch/vax/gen/_setjmp.S   Wed Jun 28 19:20:16 2000 +0000
@@ -33,7 +33,7 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
        /* .asciz "@(#)_setjmp.s        8.1 (Berkeley) 6/4/93" */
-       .asciz "$NetBSD: _setjmp.S,v 1.2 1998/10/13 00:02:19 matt Exp $"
+       .asciz "$NetBSD: _setjmp.S,v 1.3 2000/06/28 19:20:17 matt Exp $"
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -81,7 +81,7 @@
        ret                             # pop another frame
 
 done:
-       cmpb    *16(fp),reiins          # returning to an "rei"?
+       cmpb    *16(fp),$2              # returning to an "rei"?
        bneq    1f
        movab   3f,16(fp)               # do return w/ psl-pc pop
        brw     2f
@@ -95,8 +95,5 @@
        jmp     *4(r1)                  # done, return....
 
 botch:
-       calls   $0,_longjmperror
+       calls   $0,_C_LABEL(longjmperror)
        halt
-
-       .data
-reiins: rei
diff -r d9203b2b01fd -r c26144dd1a86 lib/libc/arch/vax/gen/ldexp.S
--- a/lib/libc/arch/vax/gen/ldexp.S     Wed Jun 28 17:32:48 2000 +0000
+++ b/lib/libc/arch/vax/gen/ldexp.S     Wed Jun 28 19:20:16 2000 +0000
@@ -33,7 +33,7 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
        /*.asciz "@(#)ldexp.s   8.1 (Berkeley) 6/4/93" */
-       .asciz "$NetBSD: ldexp.S,v 1.3 2000/02/05 19:53:54 kleink Exp $"
+       .asciz "$NetBSD: ldexp.S,v 1.4 2000/06/28 19:20:17 matt Exp $"
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -58,7 +58,7 @@
  */
 #define        ERANGE  34
 
-       .globl  _errno
+       .globl  _C_LABEL(errno)
 
 ENTRY(ldexp, 0)
        movd    4(ap),r0        /* fetch "value" */
@@ -82,11 +82,11 @@
 1:
 #ifdef _REENTRANT
        pushl   r0
-       calls   $0,___errno
+       calls   $0,_C_LABEL(__errno)
        movl    $ ERANGE,(r0)
        movl    (sp)+,r0
 #else
-       movl    $ ERANGE,_errno
+       movl    $ ERANGE,_C_LABEL(errno)
 #endif
        ret
 
diff -r d9203b2b01fd -r c26144dd1a86 lib/libc/arch/vax/gen/setjmp.S
--- a/lib/libc/arch/vax/gen/setjmp.S    Wed Jun 28 17:32:48 2000 +0000
+++ b/lib/libc/arch/vax/gen/setjmp.S    Wed Jun 28 19:20:16 2000 +0000
@@ -33,7 +33,7 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
        /* .asciz "@(#)setjmp.s 8.1 (Berkeley) 6/4/93" */
-       .asciz "$NetBSD: setjmp.S,v 1.3 1998/10/10 00:08:51 matt Exp $"
+       .asciz "$NetBSD: setjmp.S,v 1.4 2000/06/28 19:20:17 matt Exp $"
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -54,10 +54,10 @@
        subl2   $12,sp                  # space for current struct sigstack
        pushl   sp                      # get current values
        pushl   $0                      # no new values
-       calls   $4,___sigaltstack14     # pop args plus signal stack value
+       calls   $4,_C_LABEL(__sigaltstack14) # pop args plus signal stack value
        movl    (sp)+,(r6)+             # save onsigstack status of caller
        pushl   $0
-       calls   $1,_sigblock            # get signal mask
+       calls   $1,_C_LABEL(sigblock)   # get signal mask
        movl    r0,(r6)+                # save signal mask of caller
        movl    (ap),r0
        moval   4(ap)[r0],(r6)+         # save sp of caller
@@ -90,8 +90,8 @@
 
 done:
        pushl   r1                      # pointer to sigcontext
-       calls   $1,_sigreturn           # restore previous context
+       calls   $1,_C_LABEL(sigreturn)  # restore previous context
                                        # we should never return
 botch:
-       calls   $0,_longjmperror
+       calls   $0,_C_LABEL(longjmperror)
        halt
diff -r d9203b2b01fd -r c26144dd1a86 lib/libc/arch/vax/gen/sigsetjmp.S
--- a/lib/libc/arch/vax/gen/sigsetjmp.S Wed Jun 28 17:32:48 2000 +0000
+++ b/lib/libc/arch/vax/gen/sigsetjmp.S Wed Jun 28 19:20:16 2000 +0000
@@ -32,7 +32,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-       .asciz "$NetBSD: sigsetjmp.S,v 1.1 1995/12/09 13:26:46 ragge Exp $"
+       .asciz "$NetBSD: sigsetjmp.S,v 1.2 2000/06/28 19:20:17 matt Exp $"
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -55,14 +55,14 @@
        movl    8(ap),(_JBLEN*4)(r0)    # save "savemask"
        tstl    8(ap)                   # do saving of signal mask?
        beql    L1
-       jmp     _setjmp+2               # yep, do full setjmp
-L1:    jmp     __setjmp+2              # nope, skip to _setjmp
+       jmp     _C_LABEL(setjmp)+2      # yep, do full setjmp
+L1:    jmp     _C_LABEL(_setjmp)+2     # nope, skip to _setjmp
 
 ENTRY(siglongjmp, 0)
        movl    4(ap),r0                # get env pointer
        tstl    (_JBLEN*4)(r0)          # test if "savemask" was set
        beql    L2
-       jmp     _longjmp+2              # yep, do full longjmp
-L2:    jmp     __longjmp+2             # nope, skip to _longjmp
+       jmp     _C_LABEL(longjmp)+2     # yep, do full longjmp
+L2:    jmp     _C_LABEL(_longjmp)+2    # nope, skip to _longjmp
 
 
diff -r d9203b2b01fd -r c26144dd1a86 lib/libc/arch/vax/sys/Ovfork.S
--- a/lib/libc/arch/vax/sys/Ovfork.S    Wed Jun 28 17:32:48 2000 +0000
+++ b/lib/libc/arch/vax/sys/Ovfork.S    Wed Jun 28 19:20:16 2000 +0000
@@ -33,7 +33,7 @@
 
 #if defined(SYSLIBC_SCCS) && !defined(lint)
        /* .asciz "@(#)Ovfork.s 8.1 (Berkeley) 6/4/93" */
-       .asciz "$NetBSD: Ovfork.S,v 1.4 2000/02/05 21:02:52 kleink Exp $"
+       .asciz "$NetBSD: Ovfork.S,v 1.5 2000/06/28 19:20:18 matt Exp $"
 #endif /* SYSLIBC_SCCS and not lint */
 
 /*
@@ -72,12 +72,12 @@
 err:
 #ifdef _REENTRANT
        pushr   $0x5
-       calls   $0,___errno
+       calls   $0,_C_LABEL(__errno)
        movl    (sp)+,(r0)
        mnegl   $1,r0
        rsb
 #else
-       movl    r0,_errno
+       movl    r0,_C_LABEL(errno)
        mnegl   $1,r0
        jmp     (r2)
 #endif
diff -r d9203b2b01fd -r c26144dd1a86 lib/libc/arch/vax/sys/__sigreturn14.S
--- a/lib/libc/arch/vax/sys/__sigreturn14.S     Wed Jun 28 17:32:48 2000 +0000
+++ b/lib/libc/arch/vax/sys/__sigreturn14.S     Wed Jun 28 19:20:16 2000 +0000
@@ -33,7 +33,7 @@
 
 #if defined(SYSLIBC_SCCS) && !defined(lint)
        /* .asciz "@(#)sigreturn.s      8.1 (Berkeley) 6/4/93" */
-       .asciz "$NetBSD: __sigreturn14.S,v 1.1 1998/09/30 18:37:39 ragge Exp $"
+       .asciz "$NetBSD: __sigreturn14.S,v 1.2 2000/06/28 19:20:18 matt Exp $"
 #endif /* SYSLIBC_SCCS and not lint */
 
 #include "SYS.h"
@@ -43,9 +43,7 @@
  */
 #ifdef GPROF
 #undef ENTRY
-#define        ENTRY(x, y) \
-       .globl _ ## x; .align 2; _ ## x ## : .word 0; pushr $0x3f; \
-       .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount; popr $0x3f;
+#define        ENTRY(x, y)     _ENTRY(x, y); pushr $0x3f; _PROF_PROLOGUE; popr $0x3f
 #endif /* GPROF */
 
 SYSCALL(__sigreturn14)
diff -r d9203b2b01fd -r c26144dd1a86 lib/libc/arch/vax/sys/__vfork14.S
--- a/lib/libc/arch/vax/sys/__vfork14.S Wed Jun 28 17:32:48 2000 +0000
+++ b/lib/libc/arch/vax/sys/__vfork14.S Wed Jun 28 19:20:16 2000 +0000
@@ -33,7 +33,7 @@
 
 #if defined(SYSLIBC_SCCS) && !defined(lint)
        /* .asciz "@(#)Ovfork.s 8.1 (Berkeley) 6/4/93" */
-       .asciz "$NetBSD: __vfork14.S,v 1.2 2000/02/05 21:02:51 kleink Exp $"
+       .asciz "$NetBSD: __vfork14.S,v 1.3 2000/06/28 19:20:18 matt Exp $"
 #endif /* SYSLIBC_SCCS and not lint */
 
 /*
@@ -69,12 +69,12 @@
 err:
 #ifdef _REENTRANT
        pushr   $0x5



Home | Main Index | Thread Index | Old Index