diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-05-14 17:51:06 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-05-14 17:51:06 +0000 |
commit | 264bd143644e0f51097b40c8fdbf753297a899a9 (patch) | |
tree | e899fac8a37908fb43a3d9ce1322c0894bdd42b5 | |
parent | 41435b4e0e7f4dff561a820bdb7c8d706f4df5ca (diff) |
These files are not used (and some of them would not compile anyway).
-rw-r--r-- | sys/lib/libkern/arch/i386/setjmp.S | 84 | ||||
-rw-r--r-- | sys/lib/libkern/arch/sparc/setjmp.S | 108 | ||||
-rw-r--r-- | sys/lib/libkern/arch/sparc64/setjmp.S | 108 |
3 files changed, 0 insertions, 300 deletions
diff --git a/sys/lib/libkern/arch/i386/setjmp.S b/sys/lib/libkern/arch/i386/setjmp.S deleted file mode 100644 index 4d8f6fa111e..00000000000 --- a/sys/lib/libkern/arch/i386/setjmp.S +++ /dev/null @@ -1,84 +0,0 @@ -/* $OpenBSD: setjmp.S,v 1.3 2003/06/02 23:28:08 millert Exp $ */ -/* $NetBSD: setjmp.S,v 1.5 1994/10/26 06:39:14 cgd Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * 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. 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. - * - * @(#)setjmp.s 5.1 (Berkeley) 4/23/90 - */ - -/* - * 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. - * The previous signal state is restored. - */ - -#include "DEFS.h" -#include "SYS.h" - -ENTRY(setjmp) - pushl $0 - call PIC_PLT(_sigblock) - popl %edx - movl 4(%esp),%ecx - movl 0(%esp),%edx - movl %edx, 0(%ecx) - movl %ebx, 4(%ecx) - movl %esp, 8(%ecx) - movl %ebp,12(%ecx) - movl %esi,16(%ecx) - movl %edi,20(%ecx) - movl %eax,24(%ecx) - xorl %eax,%eax - ret - -ENTRY(longjmp) - movl 4(%esp),%edx - pushl 24(%edx) - call PIC_PLT(_sigsetmask) - popl %eax - movl 4(%esp),%edx - movl 8(%esp),%eax - movl 0(%edx),%ecx - movl 4(%edx),%ebx - movl 8(%edx),%esp - movl 12(%edx),%ebp - movl 16(%edx),%esi - movl 20(%edx),%edi - testl %eax,%eax - jnz 1f - incl %eax -1: movl %ecx,0(%esp) - ret diff --git a/sys/lib/libkern/arch/sparc/setjmp.S b/sys/lib/libkern/arch/sparc/setjmp.S deleted file mode 100644 index 1dacb63ea0c..00000000000 --- a/sys/lib/libkern/arch/sparc/setjmp.S +++ /dev/null @@ -1,108 +0,0 @@ -/* $OpenBSD: setjmp.S,v 1.4 2007/11/24 19:47:05 deraadt Exp $ */ -/* $NetBSD: setjmp.S,v 1.2 1994/10/26 06:40:08 cgd 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. 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.2 92/06/25 03:18:43 torek Exp - */ - -/* - * 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_sigprocmask, %g1 - clr %o1 /* sigprocmask(SIG_BLOCK, (sigset_t *)NULL) */ - t ST_SYSCALL - st %o0, [%o2 + 4] /* sc.sc_mask = current mask; */ - mov SYS_sigaltstack, %g1 - clr %o0 /* sigstack(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_sigreturn, %g1 - mov %i0, %o0 - t ST_SYSCALL /* sigreturn(scp); */ - -Lbotch: - /* oops, caller botched it */ - call _longjmperror - nop - unimp 0 diff --git a/sys/lib/libkern/arch/sparc64/setjmp.S b/sys/lib/libkern/arch/sparc64/setjmp.S deleted file mode 100644 index a94b179f54a..00000000000 --- a/sys/lib/libkern/arch/sparc64/setjmp.S +++ /dev/null @@ -1,108 +0,0 @@ -/* $OpenBSD: setjmp.S,v 1.4 2007/11/25 18:25:36 deraadt Exp $ */ -/* $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. 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.2 92/06/25 03:18:43 torek Exp - */ - -/* - * 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_sigprocmask, %g1 - clr %o1 /* sigprocmask(SIG_BLOCK, (sigset_t *)NULL) */ - t ST_SYSCALL - st %o0, [%o2 + 4] /* sc.sc_mask = current mask; */ - mov SYS_sigaltstack, %g1 - clr %o0 /* sigstack(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_sigreturn, %g1 - mov %i0, %o0 - t ST_SYSCALL /* sigreturn(scp); */ - -Lbotch: - /* oops, caller botched it */ - call _longjmperror - nop - unimp 0 |