Source-Changes-HG archive

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

[src/trunk]: src remove setjmp/longjmp from libkern, they're not used.



details:   https://anonhg.NetBSD.org/src/rev/7bbf3c46fa2d
branches:  trunk
changeset: 538725:7bbf3c46fa2d
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Oct 27 18:45:11 2002 +0000

description:
remove setjmp/longjmp from libkern, they're not used.

diffstat:

 lib/libc/arch/sparc/Makefile.inc       |    4 +-
 lib/libc/arch/sparc64/Makefile.inc     |    4 +-
 sys/lib/libkern/arch/sparc/_setjmp.S   |   96 --------------------------
 sys/lib/libkern/arch/sparc/setjmp.S    |  120 ---------------------------------
 sys/lib/libkern/arch/sparc64/_setjmp.S |  117 --------------------------------
 sys/lib/libkern/arch/sparc64/setjmp.S  |  118 --------------------------------
 6 files changed, 4 insertions(+), 455 deletions(-)

diffs (truncated from 497 to 300 lines):

diff -r da355b77be67 -r 7bbf3c46fa2d lib/libc/arch/sparc/Makefile.inc
--- a/lib/libc/arch/sparc/Makefile.inc  Sun Oct 27 18:41:27 2002 +0000
+++ b/lib/libc/arch/sparc/Makefile.inc  Sun Oct 27 18:45:11 2002 +0000
@@ -1,9 +1,9 @@
-#      $NetBSD: Makefile.inc,v 1.7 2002/07/10 04:29:09 thorpej Exp $
+#      $NetBSD: Makefile.inc,v 1.8 2002/10/27 18:45:11 chs Exp $
 
 KMINCLUDES= arch/sparc/SYS.h
 KMSRCS=        bzero.S ffs.S strlen.S htonl.S htons.S \
        ntohl.S ntohs.S divrem.m4 \
-       _setjmp.S mul.S saveregs.S setjmp.S umul.S
+       mul.S saveregs.S umul.S
 
 SRCS+= __sigaction14_sigtramp.c __sigtramp1.S
 
diff -r da355b77be67 -r 7bbf3c46fa2d lib/libc/arch/sparc64/Makefile.inc
--- a/lib/libc/arch/sparc64/Makefile.inc        Sun Oct 27 18:41:27 2002 +0000
+++ b/lib/libc/arch/sparc64/Makefile.inc        Sun Oct 27 18:45:11 2002 +0000
@@ -1,9 +1,9 @@
-#      $NetBSD: Makefile.inc,v 1.6 2002/07/10 04:29:09 thorpej Exp $
+#      $NetBSD: Makefile.inc,v 1.7 2002/10/27 18:45:12 chs Exp $
 
 KMINCLUDES= arch/sparc64/SYS.h
 KMSRCS=        bzero.S ffs.S strlen.S htonl.S htons.S \
        ntohl.S ntohs.S divrem.m4 \
-       _setjmp.S mul.S saveregs.S setjmp.S umul.S
+       mul.S saveregs.S umul.S
 
 SRCS+= __sigaction14_sigtramp.c __sigtramp1.S
 
diff -r da355b77be67 -r 7bbf3c46fa2d sys/lib/libkern/arch/sparc/_setjmp.S
--- a/sys/lib/libkern/arch/sparc/_setjmp.S      Sun Oct 27 18:41:27 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*     $NetBSD: _setjmp.S,v 1.5 1999/03/05 09:18:32 pk Exp $   */
-
-/*
- * Copyright (c) 1992, 1993
- *     The Regents of the University of California.  All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: Header: _setjmp.s,v 1.1 91/07/06 16:45:53 torek Exp
- */
-
-#include <machine/asm.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-       .asciz "@(#)_setjmp.s   8.1 (Berkeley) 6/4/93"
-#else
-       RCSID("$NetBSD: _setjmp.S,v 1.5 1999/03/05 09:18:32 pk Exp $")
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * C library -- _setjmp, _longjmp
- *
- *     _longjmp(a,v)
- * will generate a "return(v?v:1)" from
- * the last call to
- *     _setjmp(a)
- * by unwinding the call stack.
- * The previous signal state is NOT restored.
- */
-
-ENTRY(_setjmp)
-       st      %sp, [%o0+0]    /* store caller's stack pointer */
-       st      %o7, [%o0+4]    /* ... return pc */
-       st      %fp, [%o0+8]    /* ... and frame pointer */
-       retl
-        clr    %o0             ! return 0
-
-ENTRY(_longjmp)
-       addcc   %o1, %g0, %g6   ! compute v ? v : 1 in a global register
-       be,a    0f
-        mov    1, %g6
-0:
-       mov     %o0, %g1        ! save a in another global register
-       ld      [%g1+8], %g7    /* get caller's frame */
-1:
-       cmp     %fp, %g7        ! compare against desired frame
-       bl,a    1b              ! if below,
-        restore                !    pop frame and loop
-       be,a    2f              ! if there,
-        ld     [%g1+0], %o2    !    fetch return %sp
-
-Lbotch:
-       call    _C_LABEL(longjmperror)  ! otherwise, went too far; bomb out
-       nop
-       unimp   0
-
-2:
-       cmp     %o2, %sp        ! %sp must not decrease
-       bge,a   3f
-        mov    %o2, %sp        ! it is OK, put it in place
-       b,a     Lbotch
-3:
-       ld      [%g1+4], %o3    ! fetch pc
-       jmp     %o3 + 8         ! success, return %g6
-        mov    %g6, %o0
diff -r da355b77be67 -r 7bbf3c46fa2d sys/lib/libkern/arch/sparc/setjmp.S
--- a/sys/lib/libkern/arch/sparc/setjmp.S       Sun Oct 27 18:41:27 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*     $NetBSD: setjmp.S,v 1.5 1999/03/05 09:18:33 pk Exp $    */
-
-/*
- * Copyright (c) 1992, 1993
- *     The Regents of the University of California.  All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: Header: setjmp.s,v 1.2 92/06/25 03:18:43 torek Exp
- */
-
-#include <machine/asm.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-       .asciz "@(#)setjmp.s    8.1 (Berkeley) 6/4/93"
-#else
-       RCSID("$NetBSD: setjmp.S,v 1.5 1999/03/05 09:18:33 pk Exp $")
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * C library -- setjmp, longjmp
- *
- *     longjmp(a,v)
- * will generate a "return(v)" from
- * the last call to
- *     setjmp(a)
- * by restoring registers from the stack,
- * and a struct sigcontext, see <signal.h>
- */
-
-#include "SYS.h"
-
-ENTRY(setjmp)
-       /*
-        * We use the caller's `arg dump' area (%sp+0x44; there are 6 ints
-        * reserved there for us) to avoid having to allocate stack space
-        * here.
-        */
-       mov     %o0, %o2        /* build sigcontext in [%o2] */
-       mov     1, %o0          /* SIG_BLOCK */
-       mov     SYS_compat_13_sigprocmask13, %g1
-       clr     %o1             /* sigprocmask(SIG_BLOCK, (sigset_t *)NULL) */
-       t       ST_SYSCALL
-       st      %o0, [%o2 + 4]  /* sc.sc_mask = current mask; */
-       mov     SYS___sigaltstack14, %g1
-       clr     %o0             /* sigaltstack(NULL, &foo) */
-       add     %sp, 0x48, %o1  /* (foo being in arg dump area) */
-       t       ST_SYSCALL
-       ld      [%sp + 0x50], %o0       /* foo.ss_flags */
-       and     %o0, 1, %o1     /* onstack = foo.ss_flags & 1; */
-       st      %o0, [%o2 + 0]  /* sc.sc_onstack = current onstack; */
-       st      %sp, [%o2 + 8]  /* sc.sc_sp = sp (both ours and caller's) */
-       add     %o7, 8, %o0
-       st      %o0, [%o2 + 12] /* sc.sc_pc = return_pc */
-       add     %o7, 12, %o0
-       st      %o0, [%o2 + 16] /* sc.sc_npc = return_pc + 4 */
-       st      %g0, [%o2 + 20] /* sc.sc_psr = (clean psr) */
-       st      %fp, [%o2 + 24] /* sc.sc_g1 = %fp (misuse, but what the heck) */
-                               /* sc.sc_o0 = random(), set in longjmp */
-       retl                    /* return 0 */
-        clr    %o0
-
-/*
- * All we need to do here is force sigreturn to load a new stack pointer,
- * new <pc,npc>, and appropriate %o0 return value from the sigcontext built
- * in setjmp.  The %i and %l registers will be reloaded from the place to
- * which %sp points, due to sigreturn() semantics (sigreturn does not modify
- * the window pointer in the psr, hence it must force all windows to reload).
- */
-ENTRY(longjmp)
-       save    %sp, -96, %sp
-       ld      [%i0 + 8], %o2  /* make sure sc->sc_sp, sc->sc_fp nonzero */
-       ld      [%i0 + 24], %o3
-       orcc    %o2, %o3, %g0
-       bz      Lbotch
-        tst    %i1             /* if (v == 0) v = 1; */
-       bz,a    1f
-        mov    1, %i1
-1:
-       st      %i1, [%i0 + 28] /* sc.sc_o0 = v; */
-       mov     SYS_compat_13_sigreturn13, %g1
-       mov     %i0, %o0
-       t       ST_SYSCALL      /* sigreturn(scp); */
-
-Lbotch:
-       /* oops, caller botched it */
-       call    _C_LABEL(longjmperror)
-        nop
-       unimp   0
diff -r da355b77be67 -r 7bbf3c46fa2d sys/lib/libkern/arch/sparc64/_setjmp.S
--- a/sys/lib/libkern/arch/sparc64/_setjmp.S    Sun Oct 27 18:41:27 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*     $NetBSD: _setjmp.S,v 1.1.1.1 1998/06/20 05:18:14 eeh Exp $      */
-
-/*
- * Copyright (c) 1992, 1993
- *     The Regents of the University of California.  All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Header: _setjmp.s,v 1.1 91/07/06 16:45:53 torek Exp
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)



Home | Main Index | Thread Index | Old Index