repo_id
stringlengths
5
115
size
int64
590
5.01M
file_path
stringlengths
4
212
content
stringlengths
590
5.01M
0xffea/MINIX3
2,824
lib/libc/compat/arch/sparc/sys/compat_sigprocmask.S
/* $NetBSD: compat_sigprocmask.S,v 1.1 2005/10/15 22:11:22 uwe 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. * * from: Header: sigprocmask.s,v 1.1 91/07/06 13:06:01 torek Exp */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) #if 0 .asciz "@(#)sigprocmask.s 8.1 (Berkeley) 6/4/93" #else RCSID("$NetBSD: compat_sigprocmask.S,v 1.1 2005/10/15 22:11:22 uwe Exp $") #endif #endif /* SYSLIBC_SCCS and not lint */ #include "SYS.h" WARN_REFERENCES(sigprocmask, \ "warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference") /* * sigprocmask(int how, sigset_t *set, sigset_t *oset) */ ENTRY(sigprocmask) tst %o1 ! set == NULL? bne,a 1f ! if not, ld [%o1], %o1 ! replace it in %o1 with *set ! clr %o1 ! else block no signals ... mov 1, %o0 ! ... using sigprocmask(SIG_BLOCK) 1: mov SYS_compat_13_sigprocmask13, %g1 t ST_SYSCALL bcc 2f ! if success, tst %o2 ! check to see if oset requested ERROR() 2: bne,a 3f ! if oset != NULL, st %o0, [%o2] ! *oset = oldmask 3: retl ! in any case, return 0 clr %o0
0xffea/MINIX3
1,812
lib/libc/compat/arch/sparc/sys/compat_msgctl.S
/* $NetBSD: compat_msgctl.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(msgctl, \ "warning: reference to compatibility msgctl(); include <sys/msg.h> for correct reference") PSEUDO(msgctl,compat_14_msgctl)
0xffea/MINIX3
6,384
lib/libc/compat/arch/sparc/sys/compat___sigtramp1.S
/* $NetBSD: compat___sigtramp1.S,v 1.1 2005/10/15 22:11:22 uwe Exp $ */ /* * Copyright (c) 1996 Paul Kranenburg * Copyright (c) 1996 * The President and Fellows of Harvard College. All rights reserved. * 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. * * 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, Lawrence Berkeley Laboratory. * This product includes software developed by Harvard University. * * 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 Harvard University. * This product includes software developed by Paul Kranenburg. * 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. */ #include "SYS.h" #define _LOCORE #include <machine/frame.h> #include <machine/psl.h> #include <machine/signal.h> /* * When this code is run, the stack looks like: * [%sp] 64 bytes to which registers can be dumped * [%sp + 64] signal number (goes in %o0) * [%sp + 64 + 4] signal code (goes in %o1) * [%sp + 64 + 8] placeholder * [%sp + 64 + 12] argument for %o3, currently unsupported (always 0) * [%sp + 64 + 16] first word of saved state (sigcontext) * . * . * . * [%sp + NNN] last word of saved state * (followed by previous stack contents or top of signal stack). * The address of the function to call is in %g1; the old %g1 and %o0 * have already been saved in the sigcontext. We are running in a clean * window, all previous windows now being saved to the stack. * * Note that [%sp + 64 + 8] == %sp + 64 + 16. The copy at %sp+64+8 * will eventually be removed, with a hole left in its place, if things * work out. */ #define SAVE_STATE \ /* \ * XXX the `save' and `restore' below are unnecessary: should \ * replace with simple arithmetic on %sp \ * \ * Make room on the stack for 32 %f registers + %fsr. This comes \ * out to 33*4 or 132 bytes, but this must be aligned to a multiple \ * of 8, or 136 bytes. \ */ \ save %sp, -CCFSZ - 136, %sp; \ mov %g2, %l2; /* save globals in %l registers */ \ mov %g3, %l3; \ mov %g4, %l4; \ mov %g5, %l5; \ mov %g6, %l6; \ mov %g7, %l7; \ /* \ * Saving the fpu registers is expensive, so do it iff the fsr \ * stored in the sigcontext shows that the fpu is enabled. \ */ \ ld [%fp + 64 + 16 + SC_PSR_OFFSET], %l0; \ sethi %hi(PSR_EF), %l1; /* FPU enable is too high for andcc */ \ andcc %l0, %l1, %l0; /* %l0 = fpu enable bit */ \ be 1f; /* if not set, skip the saves */ \ rd %y, %l1; /* in any case, save %y */ \ /* fpu is enabled, oh well */ \ st %fsr, [%sp + CCFSZ + 0]; \ std %f0, [%sp + CCFSZ + 8]; \ std %f2, [%sp + CCFSZ + 16]; \ std %f4, [%sp + CCFSZ + 24]; \ std %f6, [%sp + CCFSZ + 32]; \ std %f8, [%sp + CCFSZ + 40]; \ std %f10, [%sp + CCFSZ + 48]; \ std %f12, [%sp + CCFSZ + 56]; \ std %f14, [%sp + CCFSZ + 64]; \ std %f16, [%sp + CCFSZ + 72]; \ std %f18, [%sp + CCFSZ + 80]; \ std %f20, [%sp + CCFSZ + 88]; \ std %f22, [%sp + CCFSZ + 96]; \ std %f24, [%sp + CCFSZ + 104]; \ std %f26, [%sp + CCFSZ + 112]; \ std %f28, [%sp + CCFSZ + 120]; \ std %f30, [%sp + CCFSZ + 128]; \ 1: #define RESTORE_STATE \ /* \ * Now that the handler has returned, re-establish all the state \ * we just saved above, then do a sigreturn. \ */ \ tst %l0; /* reload fpu registers? */ \ be 1f; /* if not, skip the loads */ \ wr %l1, %g0, %y; /* in any case, restore %y */ \ ld [%sp + CCFSZ + 0], %fsr; \ ldd [%sp + CCFSZ + 8], %f0; \ ldd [%sp + CCFSZ + 16], %f2; \ ldd [%sp + CCFSZ + 24], %f4; \ ldd [%sp + CCFSZ + 32], %f6; \ ldd [%sp + CCFSZ + 40], %f8; \ ldd [%sp + CCFSZ + 48], %f10; \ ldd [%sp + CCFSZ + 56], %f12; \ ldd [%sp + CCFSZ + 64], %f14; \ ldd [%sp + CCFSZ + 72], %f16; \ ldd [%sp + CCFSZ + 80], %f18; \ ldd [%sp + CCFSZ + 88], %f20; \ ldd [%sp + CCFSZ + 96], %f22; \ ldd [%sp + CCFSZ + 104], %f24; \ ldd [%sp + CCFSZ + 112], %f26; \ ldd [%sp + CCFSZ + 120], %f28; \ ldd [%sp + CCFSZ + 128], %f30; \ 1: \ mov %l2, %g2; \ mov %l3, %g3; \ mov %l4, %g4; \ mov %l5, %g5; \ mov %l6, %g6; \ mov %l7, %g7 ENTRY_NOPROFILE(__sigtramp_sigcontext_1) SAVE_STATE ldd [%fp + 64], %o0 /* sig, code */ ld [%fp + 76], %o3 /* arg3 */ call %g1 /* call handler */ add %fp, 64 + 16, %o2 /* pointer to sigcontext */ RESTORE_STATE /* Get registers back and set syscall # */ restore %g0, SYS_compat_16___sigreturn14, %g1 add %sp, 64 + 16, %o0 /* compute scp */ t ST_SYSCALL /* call sigreturn */ mov SYS_exit, %g1 /* exit with errno */ t ST_SYSCALL /* if sigreturn fails */
0xffea/MINIX3
1,812
lib/libc/compat/arch/sparc/sys/compat_shmctl.S
/* $NetBSD: compat_shmctl.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(shmctl, \ "warning: reference to compatibility shmctl(); include <sys/shm.h> for correct reference") PSEUDO(shmctl,compat_14_shmctl)
0xffea/MINIX3
2,545
lib/libc/compat/arch/sparc/sys/compat_Ovfork.S
/* $NetBSD: compat_Ovfork.S,v 1.1 2005/10/15 22:11:22 uwe 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. * * from: Header: Ovfork.s,v 1.1 91/07/06 13:05:56 torek Exp */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) #if 0 .asciz "@(#)Ovfork.s 8.1 (Berkeley) 6/4/93" #else RCSID("$NetBSD: compat_Ovfork.S,v 1.1 2005/10/15 22:11:22 uwe Exp $") #endif #endif /* SYSLIBC_SCCS and not lint */ /* * pid = vfork(); * * %o1 == 0 in parent process, 1 in child process. * %o0 == pid of child in parent, pid of parent in child. */ #include "SYS.h" WARN_REFERENCES(vfork, \ "warning: reference to compatibility vfork(); include <unistd.h> for correct reference") SYSCALL(vfork) dec %o1 ! from 1 to 0 in child, 0 to -1 in parent retl and %o0, %o1, %o0 ! return 0 in child, pid in parent
0xffea/MINIX3
1,824
lib/libc/compat/arch/sparc/sys/compat_quotactl.S
/* $NetBSD: compat_quotactl.S,v 1.2 2011/03/06 17:08:15 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(quotactl, \ "warning: reference to compatibility quotactl(); include <sys/quota.h> for correct reference") PSEUDO(quotactl,compat_50_quotactl)
0xffea/MINIX3
2,735
lib/libc/compat/arch/sparc/gen/compat_sigsetjmp.S
/* $NetBSD: compat_sigsetjmp.S,v 1.2 2007/10/08 13:06:00 uwe Exp $ */ /* * Copyright (c) 1995 Paul Kranenburg * All rights reserved. * * 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 Paul Kranenburg. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. * */ #include "SYS.h" #ifdef PIC ENTRY(sigsetjmp) PIC_PROLOGUE(%g1, %g2) ! %g1 = _GLOBAL_OFFSET_TABLE tst %o1 bnz 1f st %o1, [%o0 + 56] ! jmpbuf[JBLEN] = savemask !! if (savemask == 0) goto _setjmp set _C_LABEL(_setjmp), %g2 ld [%g1 + %g2], %g1 jmp %g1 nop !! if (savemask != 0) goto setjmp 1: set _C_LABEL(setjmp), %g2 ld [%g1 + %g2], %g1 jmp %g1 nop ENTRY(siglongjmp) PIC_PROLOGUE(%g1, %g2) ! %g1 = _GLOBAL_OFFSET_TABLE ld [%o0 + 56], %g2 ! restoremask = jmpbuf[JBLEN] tst %g2 bnz 1f nop !! if (restoremask == 0) goto _longjmp set _C_LABEL(_longjmp), %g2 ld [%g1 + %g2], %g1 jmp %g1 nop !! if (restoremask != 0) goto longjmp 1: set _C_LABEL(longjmp), %g2 ld [%g1 + %g2], %g1 jmp %g1 nop #else /* !PIC */ ENTRY(sigsetjmp) cmp %o1,0 be _C_LABEL(_setjmp) st %o1,[%o0+40] ! jmpbuf[JBLEN] nop ba,a _C_LABEL(setjmp) unimp 0 ENTRY(siglongjmp) ld [%o0+40],%g1 cmp %g1,0 be _C_LABEL(_longjmp) nop ba,a _C_LABEL(longjmp) unimp 0 #endif /* !PIC */
0xffea/MINIX3
4,265
lib/libc/compat/arch/sparc/gen/compat_setjmp.S
/* $NetBSD: compat_setjmp.S,v 1.1 2005/10/15 22:11:22 uwe 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. * * 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: compat_setjmp.S,v 1.1 2005/10/15 22:11:22 uwe 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
0xffea/MINIX3
1,696
lib/libc/compat/arch/ia64/sys/compat___semctl.S
/* $NetBSD: compat___semctl.S,v 1.2 2008/04/28 20:22:58 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" PSEUDO(__semctl,compat_14___semctl)
0xffea/MINIX3
1,824
lib/libc/compat/arch/ia64/sys/compat_quotactl.S
/* $NetBSD: compat_quotactl.S,v 1.2 2011/03/06 17:08:13 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(quotactl, \ "warning: reference to compatibility quotactl(); include <sys/quota.h> for correct reference") PSEUDO(quotactl,compat_50_quotactl)
0xffea/MINIX3
2,159
lib/libc/compat/arch/vax/sys/compat_sigreturn13.S
/* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * * 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. */ #include "SYS.h" #if defined(SYSLIBC_SCCS) && !defined(lint) /* .asciz "@(#)sigreturn.s 8.1 (Berkeley) 6/4/93" */ RCSID("$NetBSD: compat_sigreturn13.S,v 1.2 2011/01/25 02:38:16 matt Exp $") #endif /* SYSLIBC_SCCS and not lint */ /* * We must preserve the state of the registers as the user has set them up. */ #ifdef GPROF #undef ENTRY #define ENTRY(x, y) \ _ENTRY(x, y); pushr $0x3f; _PROF_PROLOGUE; popr $0x3f; #endif /* GPROF */ WARN_REFERENCES(sigreturn, \ "warning: reference to compatibility sigreturn()") PSEUDO(sigreturn,compat_13_sigreturn13)
0xffea/MINIX3
1,696
lib/libc/compat/arch/vax/sys/compat___semctl.S
/* $NetBSD: compat___semctl.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" PSEUDO(__semctl,compat_14___semctl)
0xffea/MINIX3
2,069
lib/libc/compat/arch/vax/sys/compat_sigpending13.S
/* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * 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. */ #include "SYS.h" #if defined(SYSLIBC_SCCS) && !defined(lint) /* .asciz "@(#)sigpending.s 8.1 (Berkeley) 6/4/93" */ RCSID("$NetBSD: compat_sigpending13.S,v 1.2 2011/01/25 02:38:16 matt Exp $") #endif /* SYSLIBC_SCCS and not lint */ WARN_REFERENCES(sigpending, \ "warning: reference to compatibility sigpending(); include <signal.h> for correct reference") _SYSCALL(sigpending,compat_13_sigpending13) movl %r0,*4(%ap) # store old mask clrl %r0 ret END(sigpending)
0xffea/MINIX3
2,254
lib/libc/compat/arch/vax/sys/compat___sigtramp2.S
/* $NetBSD: compat___sigtramp2.S,v 1.3 2011/01/29 22:58:47 matt Exp $ */ /* * Copyright (c) 2002 Anders Magnusson, (ragge@NetBSD.org). * All rights reserved. * * 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. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. */ /* * Signal trampoline; registers when called: * sp, pc, psl - obvious * ap - points to argument list, see machdep.c:sendsig() * fp - address of signal handler */ #include "SYS.h" #ifdef SYSLIBC_SCCS RCSID("$NetBSD: compat___sigtramp2.S,v 1.3 2011/01/29 22:58:47 matt Exp $") #endif .text _ALIGN_TEXT .globl _C_LABEL(__sigtramp_sigcontext_2) _C_LABEL(__sigtramp_sigcontext_2): nop; nop; pushr $(R0|R1|R2|R3|R4|R5) # save scratch registers callg (%ap),(%fp) # use global arg list popr $(R0|R1|R2|R3|R4|R5) # restore regs movab 8(%ap),%ap # arg is pointer to sigctx SYSTRAP(compat_16___sigreturn14) # exit from here halt # illegal insn END(__sigtramp_sigcontext_2)
0xffea/MINIX3
2,078
lib/libc/compat/arch/vax/sys/compat___sigreturn14.S
/* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * * 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. */ #include "SYS.h" #if defined(SYSLIBC_SCCS) && !defined(lint) /* .asciz "@(#)sigreturn.s 8.1 (Berkeley) 6/4/93" */ RCSID("$NetBSD: compat___sigreturn14.S,v 1.2 2011/01/25 02:38:16 matt Exp $") #endif /* SYSLIBC_SCCS and not lint */ /* * We must preserve the state of the registers as the user has set them up. */ #ifdef GPROF #undef ENTRY #define ENTRY(x, y) _ENTRY(x, y); pushr $0x3f; _PROF_PROLOGUE; popr $0x3f #endif /* GPROF */ PSEUDO(__sigreturn14,compat_16___sigreturn14)
0xffea/MINIX3
2,132
lib/libc/compat/arch/vax/sys/compat_sigsuspend13.S
/* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * 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. */ #include "SYS.h" #if defined(SYSLIBC_SCCS) && !defined(lint) /* .asciz "@(#)sigsuspend.s 8.1 (Berkeley) 6/4/93" */ RCSID("$NetBSD: compat_sigsuspend13.S,v 1.2 2011/01/25 02:38:16 matt Exp $") #endif /* SYSLIBC_SCCS and not lint */ WARN_REFERENCES(sigsuspend, \ "warning: reference to compatibility sigsuspend(); include <signal.h> for correct reference") ENTRY(sigsuspend, 0) movl *4(%ap),4(%ap) # indirect to mask arg SYSTRAP(compat_13_sigsuspend13) jcc 1f jmp CERROR+2 1: clrl %r0 # shouldnt happen ret END(sigsuspend)
0xffea/MINIX3
2,400
lib/libc/compat/arch/vax/sys/compat_sigprocmask13.S
/* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * 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. */ #include "SYS.h" #if defined(SYSLIBC_SCCS) && !defined(lint) /* .asciz "@(#)sigprocmask.s 8.1 (Berkeley) 6/4/93" */ RCSID("$NetBSD: compat_sigprocmask13.S,v 1.2 2011/01/25 02:38:16 matt Exp $") #endif /* SYSLIBC_SCCS and not lint */ WARN_REFERENCES(sigprocmask, \ "warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference") ENTRY(sigprocmask, 0) tstl 8(%ap) # check new sigset pointer bneq 1f # if not null, indirect /* movl $0,8(%ap) # null mask pointer: block empty set */ movl $1,4(%ap) # SIG_BLOCK jbr 2f 1: movl *8(%ap),8(%ap) # indirect to new mask arg 2: chmk $ SYS_compat_13_sigprocmask13 jcc 3f jmp CERROR+2 3: tstl 12(%ap) # test if old mask requested beql out movl %r0,*12(%ap) # store old mask out: clrl %r0 ret END(sigprocmask)
0xffea/MINIX3
1,812
lib/libc/compat/arch/vax/sys/compat_msgctl.S
/* $NetBSD: compat_msgctl.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(msgctl, \ "warning: reference to compatibility msgctl(); include <sys/msg.h> for correct reference") PSEUDO(msgctl,compat_14_msgctl)
0xffea/MINIX3
1,812
lib/libc/compat/arch/vax/sys/compat_shmctl.S
/* $NetBSD: compat_shmctl.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(shmctl, \ "warning: reference to compatibility shmctl(); include <sys/shm.h> for correct reference") PSEUDO(shmctl,compat_14_shmctl)
0xffea/MINIX3
1,830
lib/libc/compat/arch/vax/sys/compat_sigaction13.S
/* $NetBSD: compat_sigaction13.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(sigaction, \ "warning: reference to compatibility sigaction(); include <signal.h> for correct reference") PSEUDO(sigaction,compat_13_sigaction13)
0xffea/MINIX3
2,895
lib/libc/compat/arch/vax/sys/compat_Ovfork.S
/* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. * * 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. */ #include "SYS.h" #if defined(SYSLIBC_SCCS) && !defined(lint) /* .asciz "@(#)Ovfork.s 8.1 (Berkeley) 6/4/93" */ RCSID("$NetBSD: compat_Ovfork.S,v 1.2 2011/01/25 02:38:16 matt Exp $") #endif /* SYSLIBC_SCCS and not lint */ /* * @(#)vfork.s 4.1 (Berkeley) 12/21/80 * C library -- vfork */ WARN_REFERENCES(vfork, \ "warning: reference to compatibility vfork(); include <unistd.h> for correct reference") /* * pid = vfork(); * * %r1 == 0 in parent process, %r1 == 1 in child process. * %r0 == pid of child in parent, %r0 == pid of parent in child. * * trickery here, due to keith sklower, uses ret to clear the stack, * and then returns with a jump indirect, since only one person can return * with a ret off this stack... we do the ret before we vfork! */ ENTRY(vfork, 0) movl 16(%fp),%r2 # save return address before we smash it movab here,16(%fp) ret here: chmk $ SYS_vfork bcs err # if failed, set errno and return -1 /* this next trick is Chris Torek's fault */ mnegl %r1,%r1 # %r1 = 0xffffffff if child, 0 if parent bicl2 %r1,%r0 # %r0 &= ~%r1, i.e., 0 if child, else unchanged jmp (%r2) err: #ifdef _REENTRANT pushr $0x5 calls $0,_C_LABEL(__errno) movl (%sp)+,(%r0) mnegl $1,%r0 rsb #else movl %r0,_C_LABEL(errno) mnegl $1,%r0 jmp (%r2) #endif END(vfork)
0xffea/MINIX3
1,824
lib/libc/compat/arch/vax/sys/compat_quotactl.S
/* $NetBSD: compat_quotactl.S,v 1.2 2011/03/06 17:08:15 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(quotactl, \ "warning: reference to compatibility quotactl(); include <sys/quota.h> for correct reference") PSEUDO(quotactl,compat_50_quotactl)
0xffea/MINIX3
1,696
lib/libc/compat/arch/sparc64/sys/compat___semctl.S
/* $NetBSD: compat___semctl.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" PSEUDO(__semctl,compat_14___semctl)
0xffea/MINIX3
2,344
lib/libc/compat/arch/sparc64/sys/compat_sigreturn.S
/* $NetBSD: compat_sigreturn.S,v 1.1 2005/10/16 04:41:34 christos 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. * * from: Header: sigreturn.s,v 1.1 91/07/06 13:06:01 torek Exp */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) #if 0 .asciz "@(#)sigreturn.s 8.1 (Berkeley) 6/4/93" #else RCSID("$NetBSD: compat_sigreturn.S,v 1.1 2005/10/16 04:41:34 christos Exp $") #endif #endif /* SYSLIBC_SCCS and not lint */ #include "SYS.h" WARN_REFERENCES(sigreturn, \ "warning: reference to compatibility sigreturn()") ENTRY(sigreturn) mov SYS_compat_13_sigreturn13, %g1 t ST_SYSCALL ERROR()
0xffea/MINIX3
2,563
lib/libc/compat/arch/sparc64/sys/compat_sigpending.S
/* $NetBSD: compat_sigpending.S,v 1.1 2005/10/16 04:41:34 christos 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. * * from: Header: sigpending.s,v 1.1 91/07/06 13:06:00 torek Exp */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) #if 0 .asciz "@(#)sigpending.s 8.1 (Berkeley) 6/4/93" #else RCSID("$NetBSD: compat_sigpending.S,v 1.1 2005/10/16 04:41:34 christos Exp $") #endif #endif /* SYSLIBC_SCCS and not lint */ #include "SYS.h" WARN_REFERENCES(sigpending, \ "warning: reference to compatibility sigpending(); include <signal.h> for correct reference") ENTRY(sigpending) mov %o0, %o2 /* save pointer */ mov SYS_compat_13_sigpending13, %g1 t ST_SYSCALL /* sigpending() */ bcc,a 1f /* if success, */ st %o0, [%o2] /* store return value */ ERROR() 1: retl /* and return 0 */ clr %o0
0xffea/MINIX3
2,273
lib/libc/compat/arch/sparc64/sys/compat___sigreturn14.S
/* $NetBSD: compat___sigreturn14.S,v 1.1 2005/10/16 04:41:34 christos 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. * * from: Header: sigreturn.s,v 1.1 91/07/06 13:06:01 torek Exp */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) #if 0 .asciz "@(#)sigreturn.s 8.1 (Berkeley) 6/4/93" #else RCSID("$NetBSD: compat___sigreturn14.S,v 1.1 2005/10/16 04:41:34 christos Exp $") #endif #endif /* SYSLIBC_SCCS and not lint */ #include "SYS.h" ENTRY(__sigreturn14) mov SYS_compat_16___sigreturn14, %g1 t ST_SYSCALL ERROR()
0xffea/MINIX3
2,479
lib/libc/compat/arch/sparc64/sys/compat_sigsuspend.S
/* $NetBSD: compat_sigsuspend.S,v 1.1 2005/10/16 04:41:34 christos 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. * * from: Header: sigsuspend.s,v 1.1 91/07/06 13:06:01 torek Exp */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) #if 0 .asciz "@(#)sigsuspend.s 8.1 (Berkeley) 6/4/93" #else RCSID("$NetBSD: compat_sigsuspend.S,v 1.1 2005/10/16 04:41:34 christos Exp $") #endif #endif /* SYSLIBC_SCCS and not lint */ #include "SYS.h" WARN_REFERENCES(sigsuspend, \ "warning: reference to compatibility sigsuspend(); include <signal.h> for correct reference") ENTRY(sigsuspend) ld [%o0], %o0 /* indirect to mask argument */ mov SYS_compat_13_sigsuspend13, %g1 t ST_SYSCALL ERROR() /* always terminates with EINTR */
0xffea/MINIX3
1,828
lib/libc/compat/arch/sparc64/sys/compat_sigaction.S
/* $NetBSD: compat_sigaction.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(sigaction, \ "warning: reference to compatibility sigaction(); include <signal.h> for correct reference") PSEUDO(sigaction,compat_13_sigaction13)
0xffea/MINIX3
2,872
lib/libc/compat/arch/sparc64/sys/compat_sigprocmask.S
/* $NetBSD: compat_sigprocmask.S,v 1.1 2005/10/16 04:41:34 christos 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. * * from: Header: sigprocmask.s,v 1.1 91/07/06 13:06:01 torek Exp */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) #if 0 .asciz "@(#)sigprocmask.s 8.1 (Berkeley) 6/4/93" #else RCSID("$NetBSD: compat_sigprocmask.S,v 1.1 2005/10/16 04:41:34 christos Exp $") #endif #endif /* SYSLIBC_SCCS and not lint */ #include "SYS.h" WARN_REFERENCES(sigprocmask, \ "warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference") /* * sigprocmask(int how, sigset_t *set, sigset_t *oset) */ ENTRY(sigprocmask) brnz,a %o1, 1f /* if (set != NULL) */ ld [%o1], %o1 /* replace it in %o1 with *set */ #if 0 clr %o1 /* else block no signals ... */ #endif mov 1, %o0 /* ... using sigprocmask(SIG_BLOCK) */ 1: mov SYS_compat_13_sigprocmask13, %g1 t ST_SYSCALL bcc 2f /* if success, */ tst %o2 /* check to see if oset requested */ ERROR() 2: bne,a 3f /* if oset != NULL, */ st %o0, [%o2] /* *oset = oldmask */ 3: retl /* in any case, return 0 */ clr %o0
0xffea/MINIX3
1,812
lib/libc/compat/arch/sparc64/sys/compat_msgctl.S
/* $NetBSD: compat_msgctl.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(msgctl, \ "warning: reference to compatibility msgctl(); include <sys/msg.h> for correct reference") PSEUDO(msgctl,compat_14_msgctl)
0xffea/MINIX3
6,287
lib/libc/compat/arch/sparc64/sys/compat___sigtramp1.S
/* $NetBSD: compat___sigtramp1.S,v 1.2 2011/07/12 07:51:33 mrg Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath * Copyright (c) 1996 Paul Kranenburg * Copyright (c) 1996 * The President and Fellows of Harvard College. All rights reserved. * 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. * * 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, Lawrence Berkeley Laboratory. * This product includes software developed by Harvard University. * * 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 Harvard University. * This product includes software developed by Paul Kranenburg. * 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. */ #include "SYS.h" #define _LOCORE #include <machine/frame.h> #include <machine/fsr.h> #include <machine/ctlreg.h> #include <machine/psl.h> .register %g2,#ignore .register %g3,#ignore #define BLOCK_SIZE SPARC64_BLOCK_SIZE #define BLOCK_ALIGN SPARC64_BLOCK_ALIGN /* * When this code is run, the stack looks like: * [%sp] 128 bytes to which registers can be dumped * [%sp + 128] signal number (goes in %o0) * [%sp + 128 + 4] signal code (goes in %o1) * [%sp + 128 + 8] first word of saved state (sigcontext) * . * . * . * [%sp + NNN] last word of saved state * (followed by previous stack contents or top of signal stack). * The address of the function to call is in %g1; the old %g1 and %o0 * have already been saved in the sigcontext. We are running in a clean * window, all previous windows now being saved to the stack. * * Note that [%sp + 128 + 8] == %sp + 128 + 16. The copy at %sp+128+8 * will eventually be removed, with a hole left in its place, if things * work out. */ ENTRY_NOPROFILE(__sigtramp_sigcontext_1) /* * XXX the `save' and `restore' below are unnecessary: should * replace with simple arithmetic on %sp * * Make room on the stack for 64 %f registers + %fsr. This comes * out to 64*4+8 or 264 bytes, but this must be aligned to a multiple * of 64, or 320 bytes. */ save %sp, -CC64FSZ - 320, %sp mov %g2, %l2 /* save globals in %l registers */ mov %g3, %l3 mov %g4, %l4 mov %g5, %l5 mov %g6, %l6 mov %g7, %l7 /* * Saving the fpu registers is expensive, so do it iff it is * enabled and dirty. */ rd %fprs, %l0 btst FPRS_DL|FPRS_DU, %l0 /* All clean? */ bz,pt %icc, 2f btst FPRS_DL, %l0 /* test dl */ bz,pt %icc, 1f btst FPRS_DU, %l0 /* test du */ /* fpu is enabled, oh well */ stx %fsr, [%sp + CC64FSZ + BIAS + 0] add %sp, BIAS+CC64FSZ+BLOCK_SIZE, %l0 /* Generate a pointer so */ andn %l0, BLOCK_ALIGN, %l0 /* we can do a block store */ stda %f0, [%l0] ASI_BLK_P inc BLOCK_SIZE, %l0 stda %f16, [%l0] ASI_BLK_P 1: bz,pt %icc, 2f add %sp, BIAS+CC64FSZ+BLOCK_SIZE, %l0 /* Generate a pointer so */ andn %l0, BLOCK_ALIGN, %l0 /* we can do a block store */ add %l0, 2*BLOCK_SIZE, %l0 /* and skip what we already stored */ stda %f32, [%l0] ASI_BLK_P inc BLOCK_SIZE, %l0 stda %f48, [%l0] ASI_BLK_P 2: membar #Sync rd %y, %l1 /* in any case, save %y */ lduw [%fp + BIAS + 128], %o0 /* sig */ lduw [%fp + BIAS + 128 + 4], %o1 /* code */ call %g1 /* call handler */ add %fp, BIAS + 128 + 8, %o2 /* scp */ /* * Now that the handler has returned, re-establish all the state * we just saved above, then do a sigreturn. */ btst 3, %l0 /* All clean? */ bz,pt %icc, 2f btst 1, %l0 /* test dl */ bz,pt %icc, 1f btst 2, %l0 /* test du */ ldx [%sp + CC64FSZ + BIAS + 0], %fsr add %sp, BIAS+CC64FSZ+BLOCK_SIZE, %l0 /* Generate a pointer so */ andn %l0, BLOCK_ALIGN, %l0 /* we can do a block load */ ldda [%l0] ASI_BLK_P, %f0 inc BLOCK_SIZE, %l0 ldda [%l0] ASI_BLK_P, %f16 1: bz,pt %icc, 2f wr %l1, %g0, %y /* in any case, restore %y */ add %sp, BIAS+CC64FSZ+BLOCK_SIZE, %l0 /* Generate a pointer so */ andn %l0, BLOCK_ALIGN, %l0 /* we can do a block load */ inc 2*BLOCK_SIZE, %l0 /* and skip what we already loaded */ ldda [%l0] ASI_BLK_P, %f32 inc BLOCK_SIZE, %l0 ldda [%l0] ASI_BLK_P, %f48 2: mov %l2, %g2 mov %l3, %g3 mov %l4, %g4 mov %l5, %g5 mov %l6, %g6 mov %l7, %g7 membar #Sync /* get registers back and set syscall # */ restore %g0, SYS_compat_16___sigreturn14, %g1 add %sp, BIAS + 128 + 8, %o0 /* compute scp */ t ST_SYSCALL /* call sigreturn */ mov SYS_exit, %g1 /* exit with errno */ t ST_SYSCALL /* if sigreturn fails */
0xffea/MINIX3
1,812
lib/libc/compat/arch/sparc64/sys/compat_shmctl.S
/* $NetBSD: compat_shmctl.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(shmctl, \ "warning: reference to compatibility shmctl(); include <sys/shm.h> for correct reference") PSEUDO(shmctl,compat_14_shmctl)
0xffea/MINIX3
2,564
lib/libc/compat/arch/sparc64/sys/compat_Ovfork.S
/* $NetBSD: compat_Ovfork.S,v 1.1 2005/10/16 04:41:34 christos 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. * * from: Header: Ovfork.s,v 1.1 91/07/06 13:05:56 torek Exp */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) #if 0 .asciz "@(#)Ovfork.s 8.1 (Berkeley) 6/4/93" #else RCSID("$NetBSD: compat_Ovfork.S,v 1.1 2005/10/16 04:41:34 christos Exp $") #endif #endif /* SYSLIBC_SCCS and not lint */ /* * pid = vfork(); * * %o1 == 0 in parent process, 1 in child process. * %o0 == pid of child in parent, pid of parent in child. */ #include "SYS.h" WARN_REFERENCES(vfork, \ "warning: reference to compatibility vfork(); include <unistd.h> for correct reference") SYSCALL(vfork) dec %o1 /* from 1 to 0 in child, 0 to -1 in parent */ retl and %o0, %o1, %o0 /* return 0 in child, pid in parent */
0xffea/MINIX3
1,824
lib/libc/compat/arch/sparc64/sys/compat_quotactl.S
/* $NetBSD: compat_quotactl.S,v 1.2 2011/03/06 17:08:15 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(quotactl, \ "warning: reference to compatibility quotactl(); include <sys/quota.h> for correct reference") PSEUDO(quotactl,compat_50_quotactl)
0xffea/MINIX3
3,232
lib/libc/compat/arch/sparc64/gen/compat_sigsetjmp.S
/* $NetBSD: compat_sigsetjmp.S,v 1.1 2005/10/16 04:41:34 christos Exp $ */ /* * Copyright (c) 1995 Paul Kranenburg * All rights reserved. * * 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 Paul Kranenburg. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. * */ #include "SYS.h" #ifdef PIC #ifdef BIGPIC ENTRY(sigsetjmp) PIC_PROLOGUE(%g1,%o2) ! %g1 = _GLOBAL_OFFSET_TABLE set _C_LABEL(setjmp), %o2 ! if (%o1 != 0) goto _setjmp; set _C_LABEL(_setjmp), %o3 ! else goto __setjmp; movrnz %o1, %o2, %o3 ldx [%g1+%o3], %g1 jmp %g1 st %o1,[%o0+0x48] ! jmpbuf[JBLEN] ENTRY(siglongjmp) PIC_PROLOGUE(%g1,%o2) ! %g1 = _GLOBAL_OFFSET_TABLE ld [%o0 + 0x48],%o2 ! jmpbuf[JBLEN] set _C_LABEL(longjmp), %o3 ! if (%o2 != 0) goto _longjmp; set _C_LABEL(_longjmp), %o4 ! else goto __longjmp; movrnz %o2, %o3, %o4 ldx [%g1 + %o4], %g1 jmp %g1 nop unimp 0 #else ENTRY(sigsetjmp) PIC_PROLOGUE(%g1,%o2) ! %g1 = _GLOBAL_OFFSET_TABLE cmp %o1, 0 bne,a 1f ldx [%g1 + _C_LABEL(setjmp)], %g1 ! if (%o1 != 0) goto _setjmp; ldx [%g1 + _C_LABEL(_setjmp)], %g1 ! else goto __setjmp; 1: jmp %g1 st %o1,[%o0+0x48] ! jmpbuf[JBLEN] ENTRY(siglongjmp) PIC_PROLOGUE(%g1,%o2) ! %g1 = _GLOBAL_OFFSET_TABLE cmp %o2, 0 ld [%o0 + 0x48],%o2 ! jmpbuf[JBLEN] bne,a 1f ldx [%g1 + _C_LABEL(longjmp)], %g1 ! if (%o2 != 0) goto _longjmp; ldx [%g1 + _C_LABEL(_longjmp)], %g1 ! else goto __longjmp; 1: jmp %g1 nop unimp 0 #endif /* BIGPIC */ #else /* PIC */ ENTRY(sigsetjmp) brz,pt %o1,_C_LABEL(_setjmp) st %o1,[%o0+0x48] ! jmpbuf[JBLEN] ba,a,pt %icc,_C_LABEL(setjmp) nop ! spitfire bug unimp 0 ENTRY(siglongjmp) ld [%o0 + 0x48], %g1 brz,pt %g1, _C_LABEL(_longjmp) nop ba,a,pt %icc, _C_LABEL(longjmp) unimp 0 #endif /* PIC */
0xffea/MINIX3
4,502
lib/libc/compat/arch/sparc64/gen/compat_setjmp.S
/* $NetBSD: compat_setjmp.S,v 1.1 2005/10/16 04:41:34 christos 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. * * from: Header: setjmp.s,v 1.2 92/06/25 03:18:43 torek Exp */ #define _LOCORE #include <machine/asm.h> #include <machine/frame.h> #if defined(LIBC_SCCS) && !defined(lint) #if 0 .asciz "@(#)setjmp.s 8.1 (Berkeley) 6/4/93" #else RCSID("$NetBSD: compat_setjmp.S,v 1.1 2005/10/16 04:41:34 christos 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" #define STACK_T_SZ ENTRY(setjmp) /* * We use the part of the sigcontext structure, the sp, pc, and npc fields, * for the sigstack call so we don't need to get our own stackframe. It * won't be filled out till later anyway. */ mov %o0, %o3 /* Save our jmp_buf in %o3 */ 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, (sigset_t *)a) */ t ST_SYSCALL st %o0, [%o3 + 0x04] /* sc.sc_mask = current mask; */ mov SYS___sigaltstack14, %g1 clr %o0 /* sigstack(NULL, &foo) */ add %o3, 0x38, %o1 /* (foo being the sigcontext14 sc_mask) */ t ST_SYSCALL lduw [%o3 + 0x38+0x10], %o0 /* foo.ss_flags */ and %o0, 1, %o1 /* onstack = foo.ss_flags & 1; */ st %o0, [%o3 + 0x00] /* sc.sc_onstack = current onstack; */ stx %sp, [%o3 + 0x08] /* sc.sc_sp = sp (both ours and caller's) */ add %o7, 8, %o0 stx %o0, [%o3 + 0x10] /* sc.sc_pc = return_pc */ add %o7, 12, %o0 stx %o0, [%o3 + 0x18] /* sc.sc_npc = return_pc + 4 */ stx %g0, [%o3 + 0x20] /* sc.sc_psr = (clean psr) */ stx %fp, [%o3 + 0x28] /* 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, -CC64FSZ, %sp ldx [%i0 + 0x08], %o2 /* make sure sc->sc_sp, sc->sc_fp nonzero */ ldx [%i0 + 0x28], %o3 orcc %o2, %o3, %g0 bz,pn %xcc, Lbotch movrz %i1, 1, %i1 /* if (v == 0) v = 1; */ st %i1, [%i0 + 0x30] /* 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
0xffea/MINIX3
1,696
lib/libc/compat/arch/arm/sys/compat___semctl.S
/* $NetBSD: compat___semctl.S,v 1.2 2008/04/28 20:22:58 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" PSEUDO(__semctl,compat_14___semctl)
0xffea/MINIX3
1,945
lib/libc/compat/arch/arm/sys/compat_sigreturn.S
/* $NetBSD: compat_sigreturn.S,v 1.2 2005/10/16 22:16:05 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * 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. * * from: @(#)sigreturn.s 5.2 (Berkeley) 12/17/90" */ #include "SYS.h" /* * We must preserve the state of the registers as the user has set them up. */ WARN_REFERENCES(sigreturn, \ "warning: reference to compatibility sigreturn()") PSEUDO(sigreturn,compat_13_sigreturn13)
0xffea/MINIX3
1,993
lib/libc/compat/arch/arm/sys/compat_sigpending.S
/* $NetBSD: compat_sigpending.S,v 1.1 2005/10/16 17:27:50 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * 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. * * from: @(#)sigpending.s 5.1 (Berkeley) 7/1/90 */ #include "SYS.h" WARN_REFERENCES(sigpending, \ "warning: reference to compatibility sigpending(); include <signal.h> for correct reference") ENTRY(sigpending) mov r2, r0 SYSTRAP(compat_13_sigpending13) bcs PIC_SYM(CERROR, PLT) str r0, [r2] mov r0, #0x00000000 RET
0xffea/MINIX3
1,870
lib/libc/compat/arch/arm/sys/compat___sigreturn14.S
/* $NetBSD: compat___sigreturn14.S,v 1.1 2005/10/16 17:27:50 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * 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. * * from: @(#)sigreturn.s 5.2 (Berkeley) 12/17/90" */ #include "SYS.h" /* * We must preserve the state of the registers as the user has set them up. */ PSEUDO(__sigreturn14,compat_16___sigreturn14)
0xffea/MINIX3
1,983
lib/libc/compat/arch/arm/sys/compat_sigsuspend.S
/* $NetBSD: compat_sigsuspend.S,v 1.1 2005/10/16 17:27:50 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * 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. * * from: @(#)sigsuspend.s 5.2 (Berkeley) 12/17/90 */ #include "SYS.h" WARN_REFERENCES(sigsuspend, \ "warning: reference to compatibility sigsuspend(); include <signal.h> for correct reference") ENTRY(sigsuspend) ldr r0, [r0] SYSTRAP(compat_13_sigsuspend13) bcs PIC_SYM(CERROR, PLT) mov r0, #0x00000000 RET
0xffea/MINIX3
1,828
lib/libc/compat/arch/arm/sys/compat_sigaction.S
/* $NetBSD: compat_sigaction.S,v 1.2 2008/04/28 20:22:58 martin Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(sigaction, \ "warning: reference to compatibility sigaction(); include <signal.h> for correct reference") PSEUDO(sigaction,compat_13_sigaction13)
0xffea/MINIX3
2,095
lib/libc/compat/arch/arm/sys/compat_sigprocmask.S
/* $NetBSD: compat_sigprocmask.S,v 1.1 2005/10/16 17:27:50 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * 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. * * from: @(#)sigprocmask.s 5.2 (Berkeley) 12/17/90 */ #include "SYS.h" WARN_REFERENCES(sigprocmask, \ "warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference") ENTRY(sigprocmask) teq r1, #0x00000000 moveq r0, #0x00000001 moveq r1, #0x00000000 ldrne r1, [r1] SYSTRAP(compat_13_sigprocmask13) bcs PIC_SYM(CERROR, PLT) teq r2, #0x00000000 strne r0, [r2] mov r0, #0x00000000 RET
0xffea/MINIX3
1,812
lib/libc/compat/arch/arm/sys/compat_msgctl.S
/* $NetBSD: compat_msgctl.S,v 1.2 2008/04/28 20:22:58 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(msgctl, \ "warning: reference to compatibility msgctl(); include <sys/msg.h> for correct reference") PSEUDO(msgctl,compat_14_msgctl)
0xffea/MINIX3
1,988
lib/libc/compat/arch/arm/sys/compat___sigtramp1.S
/* $NetBSD: compat___sigtramp1.S,v 1.2 2008/04/28 20:22:58 martin Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" /* * The ARM signal trampoline is invoked only to return from * the signal; the kernel calls the signal handler directly. * * On entry, the stack looks like: * * sp-> sigcontext structure */ ENTRY_NP(__sigtramp_sigcontext_1) mov r0, sp /* get pointer to sigcontext */ SYSTRAP(compat_16___sigreturn14) /* and call sigreturn */ /* If that failed, exit with the error code. */ SYSTRAP(exit)
0xffea/MINIX3
1,812
lib/libc/compat/arch/arm/sys/compat_shmctl.S
/* $NetBSD: compat_shmctl.S,v 1.2 2008/04/28 20:22:58 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(shmctl, \ "warning: reference to compatibility shmctl(); include <sys/shm.h> for correct reference") PSEUDO(shmctl,compat_14_shmctl)
0xffea/MINIX3
2,241
lib/libc/compat/arch/arm/sys/compat_Ovfork.S
/* $NetBSD: compat_Ovfork.S,v 1.1 2005/10/16 17:27:50 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * 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. * * from: @(#)Ovfork.s 5.1 (Berkeley) 4/23/90 */ #include "SYS.h" WARN_REFERENCES(vfork, \ "warning: reference to compatibility vfork(); include <unistd.h> for correct reference") /* * pid = vfork(); * * On return from the SWI: * r1 == 0 in parent process, r1 == 1 in child process. * r0 == pid of child in parent, r0 == pid of parent in child. */ .text .align 0 ENTRY(vfork) mov r2, r14 SYSTRAP(vfork) bcs PIC_SYM(CERROR, PLT) mov r14, r2 sub r1, r1, #1 /* r1 == 0xffffffff if parent, 0 if child */ and r0, r0, r1 /* r0 == 0 if child, else unchanged */ RET
0xffea/MINIX3
2,380
lib/libc/compat/arch/arm/gen/compat_sigsetjmp.S
/* $NetBSD: compat_sigsetjmp.S,v 1.1 2005/10/16 17:27:50 christos Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe * All rights reserved. * * 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 Mark Brinicombe * 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 AUTHOR 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 AUTHOR 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. */ #include <machine/asm.h> #include <machine/setjmp.h> /* * C library -- sigsetjmp, siglongjmp * * longjmp(a,v) * will generate a "return(v)" from the last call to * setjmp(a, m) * by restoring registers from the stack. * The previous signal state is restored. */ ENTRY(sigsetjmp) teq r1, #0 beq PIC_SYM(_C_LABEL(_setjmp), PLT) b PIC_SYM(_C_LABEL(setjmp), PLT) .L_setjmp_magic: .word _JB_MAGIC__SETJMP ENTRY(siglongjmp) ldr r2, .L_setjmp_magic ldr r3, [r0] teq r2, r3 beq PIC_SYM(_C_LABEL(_longjmp), PLT) b PIC_SYM(_C_LABEL(longjmp), PLT)
0xffea/MINIX3
3,547
lib/libc/compat/arch/arm/gen/compat_setjmp.S
/* $NetBSD: compat_setjmp.S,v 1.1 2005/10/16 17:27:50 christos Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe * All rights reserved. * * 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 Mark Brinicombe * 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 AUTHOR 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 AUTHOR 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. */ #include <machine/asm.h> #include <machine/setjmp.h> /* * 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. */ ENTRY(setjmp) /* Block all signals and retrieve the old signal mask */ stmfd sp!, {r0, r14} mov r0, #0x00000000 bl PIC_SYM(_C_LABEL(sigblock), PLT) mov r1, r0 ldmfd sp!, {r0, r14} /* Store signal mask */ str r1, [r0, #(25 * 4)] ldr r1, .Lsetjmp_magic str r1, [r0], #4 #ifdef SOFTFLOAT add r0, r0, #52 #else /* Store fp registers */ sfm f4, 4, [r0], #48 /* Store fpsr */ rfs r1 str r1, [r0], #0x0004 #endif /*SOFTFLOAT*/ /* Store integer registers */ stmia r0, {r4-r14} mov r0, #0x00000000 RET .Lsetjmp_magic: .word _JB_MAGIC_SETJMP ENTRY(longjmp) ldr r2, .Lsetjmp_magic ldr r3, [r0] teq r2, r3 bne botch /* Fetch signal mask */ ldr r2, [r0, #(25 * 4)] /* Set signal mask */ stmfd sp!, {r0, r1, r14} sub sp, sp, #4 /* align the stack */ mov r0, r2 bl PIC_SYM(_C_LABEL(sigsetmask), PLT) add sp, sp, #4 /* unalign the stack */ ldmfd sp!, {r0, r1, r14} add r0, r0, #4 #ifdef SOFTFLOAT add r0, r0, #52 #else /* Restore fp registers */ lfm f4, 4, [r0], #48 /* Restore FPSR */ ldr r4, [r0], #0x0004 wfs r4 #endif /* SOFTFLOAT */ /* Restore integer registers */ ldmia r0, {r4-r14} /* Validate sp and r14 */ teq sp, #0 teqne r14, #0 beq botch /* Set return value */ mov r0, r1 teq r0, #0x00000000 moveq r0, #0x00000001 RET /* validation failed, die die die. */ botch: bl PIC_SYM(_C_LABEL(longjmperror), PLT) bl PIC_SYM(_C_LABEL(abort), PLT) b . - 8 /* Cannot get here */
0xffea/MINIX3
1,696
lib/libc/compat/arch/x86_64/sys/compat___semctl.S
/* $NetBSD: compat___semctl.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" PSEUDO(__semctl,compat_14___semctl)
0xffea/MINIX3
2,060
lib/libc/compat/arch/x86_64/sys/compat_sigreturn.S
/* $NetBSD: compat_sigreturn.S,v 1.1 2006/03/11 18:59:21 christos 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. * * from: @(#)sigreturn.s 5.2 (Berkeley) 12/17/90" */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) RCSID("$NetBSD: compat_sigreturn.S,v 1.1 2006/03/11 18:59:21 christos Exp $") #endif /* SYSLIBC_SCCS and not lint */ /* Nothing here. We don't need NetBSD-1.3 binary compatibility. */
0xffea/MINIX3
2,241
lib/libc/compat/arch/x86_64/sys/compat_sigpending.S
/* $NetBSD: compat_sigpending.S,v 1.1 2006/03/11 18:59:21 christos 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. * * from: @(#)sigpending.s 5.1 (Berkeley) 7/1/90 */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) RCSID("$NetBSD: compat_sigpending.S,v 1.1 2006/03/11 18:59:21 christos Exp $") #endif /* SYSLIBC_SCCS and not lint */ #include "SYS.h" WARN_REFERENCES(sigpending, \ "warning: reference to compatibility sigpending(); include <signal.h> for correct reference") _SYSCALL(sigpending,compat_13_sigpending13) movl %eax,(%rdi) # store old mask xorl %eax,%eax ret
0xffea/MINIX3
2,068
lib/libc/compat/arch/x86_64/sys/compat___sigreturn14.S
/* $NetBSD: compat___sigreturn14.S,v 1.1 2006/03/11 18:59:21 christos 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. * * from: @(#)sigreturn.s 5.2 (Berkeley) 12/17/90" */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) RCSID("$NetBSD: compat___sigreturn14.S,v 1.1 2006/03/11 18:59:21 christos Exp $") #endif /* SYSLIBC_SCCS and not lint */ /* Nothing here. We don't need NetBSD-1.6 binary compatibility. */
0xffea/MINIX3
2,364
lib/libc/compat/arch/x86_64/sys/compat_sigsuspend.S
/* $NetBSD: compat_sigsuspend.S,v 1.1 2006/03/11 18:59:21 christos 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. * * from: @(#)sigsuspend.s 5.2 (Berkeley) 12/17/90 */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) RCSID("$NetBSD: compat_sigsuspend.S,v 1.1 2006/03/11 18:59:21 christos Exp $") #endif /* SYSLIBC_SCCS and not lint */ #include "SYS.h" WARN_REFERENCES(sigsuspend, \ "warning: reference to compatibility sigsuspend(); include <signal.h> for correct reference") ENTRY(sigsuspend) movl (%rdi),%edi # indirect to mask arg SYSTRAP(compat_13_sigsuspend13) jc err xorl %eax,%eax # shouldn t happen ret err: #ifdef PIC movq PIC_GOT(CERROR), %rcx jmp *%rcx #else jmp CERROR #endif
0xffea/MINIX3
1,828
lib/libc/compat/arch/x86_64/sys/compat_sigaction.S
/* $NetBSD: compat_sigaction.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(sigaction, \ "warning: reference to compatibility sigaction(); include <signal.h> for correct reference") PSEUDO(sigaction,compat_13_sigaction13)
0xffea/MINIX3
2,565
lib/libc/compat/arch/x86_64/sys/compat_sigprocmask.S
/* $NetBSD: compat_sigprocmask.S,v 1.1 2006/03/11 18:59:21 christos 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. * * from: @(#)sigprocmask.s 5.2 (Berkeley) 12/17/90 */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) RCSID("$NetBSD: compat_sigprocmask.S,v 1.1 2006/03/11 18:59:21 christos Exp $") #endif /* SYSLIBC_SCCS and not lint */ #include "SYS.h" WARN_REFERENCES(sigprocmask, \ "warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference") ENTRY(sigprocmask) testq %rsi,%rsi # check new sigset pointer jnz 1f # if not null, indirect movl $1,%edi # SIG_BLOCK jmp 2f 1: movl (%rsi),%esi # fetch indirect ... 2: SYSTRAP(compat_13_sigprocmask13) jc err testq %rdx,%rdx # test if old mask requested jz out movq %rax,(%rdx) # store old mask out: xorl %eax,%eax ret err: #ifdef PIC movq PIC_GOT(CERROR), %rcx jmp *%rcx #else jmp CERROR #endif
0xffea/MINIX3
1,812
lib/libc/compat/arch/x86_64/sys/compat_msgctl.S
/* $NetBSD: compat_msgctl.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(msgctl, \ "warning: reference to compatibility msgctl(); include <sys/msg.h> for correct reference") PSEUDO(msgctl,compat_14_msgctl)
0xffea/MINIX3
1,812
lib/libc/compat/arch/x86_64/sys/compat_shmctl.S
/* $NetBSD: compat_shmctl.S,v 1.2 2008/04/28 20:22:59 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(shmctl, \ "warning: reference to compatibility shmctl(); include <sys/shm.h> for correct reference") PSEUDO(shmctl,compat_14_shmctl)
0xffea/MINIX3
2,474
lib/libc/compat/arch/x86_64/sys/compat_Ovfork.S
/* $NetBSD: compat_Ovfork.S,v 1.1 2006/03/11 18:59:21 christos 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. * * from: @(#)Ovfork.s 5.1 (Berkeley) 4/23/90 */ #include <machine/asm.h> #if defined(SYSLIBC_SCCS) && !defined(lint) RCSID("$NetBSD: compat_Ovfork.S,v 1.1 2006/03/11 18:59:21 christos Exp $") #endif /* SYSLIBC_SCCS and not lint */ #include "SYS.h" WARN_REFERENCES(vfork, \ "warning: reference to compatibility vfork(); include <unistd.h> for correct reference") /* * pid = vfork(); * * %edx == 0 in parent process, %edx == 1 in child process. * %eax == pid of child in parent, %eax == pid of parent in child. * */ ENTRY(vfork) popq %r9 /* my rta into r9 */ SYSTRAP(vfork) jc err decl %edx andl %edx,%eax jmp *%r9 err: pushq %r9 #ifdef PIC movq PIC_GOT(CERROR), %rcx jmp *%rcx #else jmp CERROR #endif
0xffea/MINIX3
1,696
lib/libc/compat/arch/alpha/sys/compat___semctl.S
/* $NetBSD: compat___semctl.S,v 1.2 2008/04/28 20:22:58 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" PSEUDO(__semctl,compat_14___semctl)
0xffea/MINIX3
1,421
lib/libc/compat/arch/alpha/sys/compat_sigreturn.S
/* $NetBSD: compat_sigreturn.S,v 1.1 2005/09/16 18:21:20 drochner Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. * All rights reserved. * * Author: Chris G. Demetriou * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ #include "SYS.h" /* * We must preserve the state of the registers as the user has set them up. * However, that doesn't involve any special work on the Alpha. * (XXX PROFILING) */ WARN_REFERENCES(sigreturn, \ "warning: reference to compatibility sigreturn()") PSEUDO(sigreturn,compat_13_sigreturn13)
0xffea/MINIX3
1,390
lib/libc/compat/arch/alpha/sys/compat_sigpending.S
/* $NetBSD: compat_sigpending.S,v 1.1 2005/09/16 18:21:20 drochner Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. * All rights reserved. * * Author: Chris G. Demetriou * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ #include "SYS.h" WARN_REFERENCES(sigpending, \ "warning: reference to compatibility sigpending(); include <signal.h> for correct reference") LEAF(sigpending,0) /* XXX # of args? */ CALLSYS_ERROR(compat_13_sigpending13) stl v0, 0(a0) mov zero, v0 RET END(sigpending)
0xffea/MINIX3
1,346
lib/libc/compat/arch/alpha/sys/compat___sigreturn14.S
/* $NetBSD: compat___sigreturn14.S,v 1.1 2005/09/16 18:21:19 drochner Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. * All rights reserved. * * Author: Chris G. Demetriou * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ #include "SYS.h" /* * We must preserve the state of the registers as the user has set them up. * However, that doesn't involve any special work on the Alpha. * (XXX PROFILING) */ PSEUDO(__sigreturn14,compat_16___sigreturn14)
0xffea/MINIX3
1,441
lib/libc/compat/arch/alpha/sys/compat_sigsuspend.S
/* $NetBSD: compat_sigsuspend.S,v 1.1 2005/09/16 18:21:20 drochner Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. * All rights reserved. * * Author: Chris G. Demetriou * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ #include "SYS.h" WARN_REFERENCES(sigsuspend, \ "warning: reference to compatibility sigsuspend(); include <signal.h> for correct reference") LEAF(sigsuspend, 1) ldl a0, 0(a0) /* pass *mask instead of mask */ CALLSYS_ERROR(compat_13_sigsuspend13) mov zero, v0 /* shouldn't need; just in case... */ RET END(sigsuspend)
0xffea/MINIX3
1,828
lib/libc/compat/arch/alpha/sys/compat_sigaction.S
/* $NetBSD: compat_sigaction.S,v 1.2 2008/04/28 20:22:58 martin Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(sigaction, \ "warning: reference to compatibility sigaction(); include <signal.h> for correct reference") PSEUDO(sigaction,compat_13_sigaction13)
0xffea/MINIX3
1,652
lib/libc/compat/arch/alpha/sys/compat_sigprocmask.S
/* $NetBSD: compat_sigprocmask.S,v 1.1 2005/09/16 18:21:20 drochner Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. * All rights reserved. * * Author: Chris G. Demetriou * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ #include "SYS.h" WARN_REFERENCES(sigprocmask, \ "warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference") LEAF(sigprocmask, 3) mov a2, a5 /* safe */ cmoveq a1, 1, a0 /* if set == NULL, how = SIG_BLOCK */ beq a1, Ldoit /* and set = 0, and do it. */ ldl a1, 0(a1) /* load the set from *set */ Ldoit: CALLSYS_ERROR(compat_13_sigprocmask13) beq a5, Lret /* if they don't want old mask, done */ stl v0, 0(a5) /* otherwise, give it to them. */ Lret: mov zero, v0 RET END(sigprocmask)
0xffea/MINIX3
1,812
lib/libc/compat/arch/alpha/sys/compat_msgctl.S
/* $NetBSD: compat_msgctl.S,v 1.2 2008/04/28 20:22:58 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(msgctl, \ "warning: reference to compatibility msgctl(); include <sys/msg.h> for correct reference") PSEUDO(msgctl,compat_14_msgctl)
0xffea/MINIX3
1,642
lib/libc/compat/arch/alpha/sys/compat___sigtramp1.S
/* $NetBSD: compat___sigtramp1.S,v 1.1 2005/09/16 18:21:19 drochner Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. * All rights reserved. * * Author: Chris G. Demetriou * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ #include "SYS.h" /* * The Alpha signal trampoline is invoked only to return from * the signal; the kernel calls the signal handler directly. * * On entry, the stack looks like: * * sp-> sigcontext structure */ NESTED_NOPROFILE(__sigtramp_sigcontext_1,0,0,ra,0,0) mov sp, a0 /* get pointer to sigcontext */ CALLSYS_NOERROR(compat_16___sigreturn14) /* and call sigreturn() with it */ mov v0, a0 /* if that failed, get error code */ CALLSYS_NOERROR(exit) /* and call exit() with it */ END(__sigtramp_sigcontext_1)
0xffea/MINIX3
1,812
lib/libc/compat/arch/alpha/sys/compat_shmctl.S
/* $NetBSD: compat_shmctl.S,v 1.2 2008/04/28 20:22:58 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(shmctl, \ "warning: reference to compatibility shmctl(); include <sys/shm.h> for correct reference") PSEUDO(shmctl,compat_14_shmctl)
0xffea/MINIX3
1,327
lib/libc/compat/arch/alpha/sys/compat_Ovfork.S
/* $NetBSD: compat_Ovfork.S,v 1.1 2005/09/16 18:21:19 drochner Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. * All rights reserved. * * Author: Chris G. Demetriou * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ #include "SYS.h" WARN_REFERENCES(vfork, \ "warning: reference to compatibility vfork(); include <unistd.h> for correct reference") SYSCALL(vfork) cmovne a4, zero, v0 /* a4 (rv[1]) != 0, child */ RET END(vfork)
0xffea/MINIX3
1,824
lib/libc/compat/arch/alpha/sys/compat_quotactl.S
/* $NetBSD: compat_quotactl.S,v 1.2 2011/03/06 17:08:12 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(quotactl, \ "warning: reference to compatibility quotactl(); include <sys/quota.h> for correct reference") PSEUDO(quotactl,compat_50_quotactl)
0xffea/MINIX3
3,844
lib/libc/compat/arch/alpha/gen/compat__setjmp.S
/* $NetBSD: compat__setjmp.S,v 1.1 2005/09/16 18:21:19 drochner Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. * All rights reserved. * * Author: Chris G. Demetriou * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ #include <machine/asm.h> /* * 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 NOT restored. */ .set noreorder LEAF(_setjmp, 1) LDGP(pv) stq ra, (2 * 8)(a0) /* sc_pc = return address */ stq s0, (( 9 + 4) * 8)(a0) /* saved bits of sc_regs */ stq s1, ((10 + 4) * 8)(a0) stq s2, ((11 + 4) * 8)(a0) stq s3, ((12 + 4) * 8)(a0) stq s4, ((13 + 4) * 8)(a0) stq s5, ((14 + 4) * 8)(a0) stq s6, ((15 + 4) * 8)(a0) stq ra, ((26 + 4) * 8)(a0) stq sp, ((30 + 4) * 8)(a0) ldiq t0, 0xacedbadd /* sigcontext magic number */ stq t0, ((31 + 4) * 8)(a0) /* magic in sc_regs[31] */ /* Too bad we can't check if we actually used FP */ ldiq t0, 1 stq t0, (36 * 8)(a0) /* say we've used FP. */ stt fs0, ((2 + 37) * 8)(a0) /* saved bits of sc_fpregs */ stt fs1, ((3 + 37) * 8)(a0) stt fs2, ((4 + 37) * 8)(a0) stt fs3, ((5 + 37) * 8)(a0) stt fs4, ((6 + 37) * 8)(a0) stt fs5, ((7 + 37) * 8)(a0) stt fs6, ((8 + 37) * 8)(a0) stt fs7, ((9 + 37) * 8)(a0) mf_fpcr ft0 /* get FP control reg */ stt ft0, (69 * 8)(a0) /* and store it in sc_fpcr */ stq zero, (70 * 8)(a0) /* FP software control XXX */ stq zero, (71 * 8)(a0) /* sc_reserved[0] */ stq zero, (72 * 8)(a0) /* sc_reserved[1] */ stq zero, (73 * 8)(a0) /* sc_xxx[0] */ stq zero, (74 * 8)(a0) /* sc_xxx[1] */ stq zero, (75 * 8)(a0) /* sc_xxx[2] */ stq zero, (76 * 8)(a0) /* sc_xxx[3] */ stq zero, (77 * 8)(a0) /* sc_xxx[4] */ stq zero, (78 * 8)(a0) /* sc_xxx[5] */ stq zero, (79 * 8)(a0) /* sc_xxx[6] */ stq zero, (80 * 8)(a0) /* sc_xxx[7] */ mov zero, v0 /* return zero */ RET END(_setjmp) LEAF(_longjmp, 2) LDGP(pv) ldq t0, ((31 + 4) * 8)(a0) /* magic in sc_regs[31] */ ldiq t1, 0xacedbadd cmpeq t0, t1, t0 beq t0, botch /* If the magic was bad, punt */ ldq ra, (2 * 8)(a0) /* sc_pc = return address */ ldq s0, (( 9 + 4) * 8)(a0) /* saved bits of sc_regs */ ldq s1, ((10 + 4) * 8)(a0) ldq s2, ((11 + 4) * 8)(a0) ldq s3, ((12 + 4) * 8)(a0) ldq s4, ((13 + 4) * 8)(a0) ldq s5, ((14 + 4) * 8)(a0) ldq s6, ((15 + 4) * 8)(a0) /* ldq ra, ((26 + 4) * 8)(a0) set above */ ldq sp, ((30 + 4) * 8)(a0) ldt fs0, ((2 + 37) * 8)(a0) /* saved bits of sc_fpregs */ ldt fs1, ((3 + 37) * 8)(a0) ldt fs2, ((4 + 37) * 8)(a0) ldt fs3, ((5 + 37) * 8)(a0) ldt fs4, ((6 + 37) * 8)(a0) ldt fs5, ((7 + 37) * 8)(a0) ldt fs6, ((8 + 37) * 8)(a0) ldt fs7, ((9 + 37) * 8)(a0) ldt ft0, (69 * 8)(a0) /* get sc_fpcr */ mt_fpcr ft0 /* and restore it. */ mov a1, v0 /* return second arg */ RET botch: CALL(longjmperror) CALL(abort) RET /* "can't" get here... */ END(_longjmp)
0xffea/MINIX3
1,815
lib/libc/compat/arch/alpha/gen/compat_sigsetjmp.S
/* $NetBSD: compat_sigsetjmp.S,v 1.1 2005/09/16 18:21:19 drochner Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. * All rights reserved. * * Author: Chris G. Demetriou * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ #include <machine/asm.h> /* * C library -- sigsetjmp, siglongjmp * * siglongjmp(a,v) * will generate a "return(v)" from * the last call to * sigsetjmp(a, mask) * by restoring registers from the stack. * If `mask' is non-zero, the previous signal * state will be restored. */ .set noreorder LEAF(sigsetjmp, 2) LDGP(pv) stq a1, (81 * 8)(a0) /* save the mask */ bne a1, Lsavesig /* if !zero, save signals */ jmp zero, _setjmp /* else don't. */ Lsavesig: jmp zero, setjmp END(sigsetjmp) LEAF(siglongjmp, 2) LDGP(pv) ldq t0, (81 * 8)(a0) /* get the mask */ bne t0, Lrestoresig /* if !zero, restore signals */ jmp zero, _longjmp Lrestoresig: jmp zero, longjmp END(siglongjmp)
0xffea/MINIX3
3,763
lib/libc/compat/arch/alpha/gen/compat_setjmp.S
/* $NetBSD: compat_setjmp.S,v 1.1 2005/09/16 18:21:19 drochner Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. * All rights reserved. * * Author: Chris G. Demetriou * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ #include <machine/asm.h> /* * 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 the previous signal state. */ .set noreorder LEAF(setjmp, 1) LDGP(pv) stq ra, (2 * 8)(a0) /* sc_pc = return address */ stq s0, (( 9 + 4) * 8)(a0) /* saved bits of sc_regs */ stq s1, ((10 + 4) * 8)(a0) stq s2, ((11 + 4) * 8)(a0) stq s3, ((12 + 4) * 8)(a0) stq s4, ((13 + 4) * 8)(a0) stq s5, ((14 + 4) * 8)(a0) stq s6, ((15 + 4) * 8)(a0) stq ra, ((26 + 4) * 8)(a0) stq sp, ((30 + 4) * 8)(a0) /* * get signal information */ mov a0, s0 /* squirrel away ptr to sc */ /* see what's blocked */ mov zero, a0 CALL(sigblock) /* see what's blocked */ stq v0, (1 * 8)(s0) /* and remember it in sc_mask */ lda sp, -24(sp) /* sizeof struct sigaltstack */ mov zero, a0 mov sp, a1 CALL(__sigaltstack14) ldl t0, 16(sp) /* offset of ss_flags */ lda sp, 24(sp) /* sizeof struct sigaltstack */ ldq ra, ((26 + 4) * 8)(s0) /* restore return address */ blt v0, botch /* check for error */ and t0, 0x1, t0 /* get SA_ONSTACK flag */ stq t0, (0 * 8)(s0) /* and save it in sc_onstack */ /* * Restore old s0 and a0, and continue saving registers */ mov s0, a0 ldq s0, (( 9 + 4) * 8)(a0) ldiq t0, 0xacedbade /* sigcontext magic number */ stq t0, ((31 + 4) * 8)(a0) /* magic in sc_regs[31] */ /* Too bad we can't check if we actually used FP */ ldiq t0, 1 stq t0, (36 * 8)(a0) /* say we've used FP. */ stt fs0, ((2 + 37) * 8)(a0) /* saved bits of sc_fpregs */ stt fs1, ((3 + 37) * 8)(a0) stt fs2, ((4 + 37) * 8)(a0) stt fs3, ((5 + 37) * 8)(a0) stt fs4, ((6 + 37) * 8)(a0) stt fs5, ((7 + 37) * 8)(a0) stt fs6, ((8 + 37) * 8)(a0) stt fs7, ((9 + 37) * 8)(a0) mf_fpcr ft0 /* get FP control reg */ stt ft0, (69 * 8)(a0) /* and store it in sc_fpcr */ stq zero, (70 * 8)(a0) /* FP software control XXX */ stq zero, (71 * 8)(a0) /* sc_reserved[0] */ stq zero, (72 * 8)(a0) /* sc_reserved[1] */ stq zero, (73 * 8)(a0) /* sc_xxx[0] */ stq zero, (74 * 8)(a0) /* sc_xxx[1] */ stq zero, (75 * 8)(a0) /* sc_xxx[2] */ stq zero, (76 * 8)(a0) /* sc_xxx[3] */ stq zero, (77 * 8)(a0) /* sc_xxx[4] */ stq zero, (78 * 8)(a0) /* sc_xxx[5] */ stq zero, (79 * 8)(a0) /* sc_xxx[6] */ stq zero, (80 * 8)(a0) /* sc_xxx[7] */ mov zero, v0 /* return zero */ RET END(setjmp) LEAF(longjmp, 2) LDGP(pv) stq a1, (( 0 + 4) * 8)(a0) /* save return value */ CALL(sigreturn) /* use sigreturn to return */ botch: CALL(longjmperror) CALL(abort) RET /* "can't" get here... */ END(longjmp)
0xffea/MINIX3
1,846
lib/libc/compat/arch/mips/sys/compat___semctl.S
/* $NetBSD: compat___semctl.S,v 1.4 2009/12/14 03:04:33 matt Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) RCSID("$NetBSD: compat___semctl.S,v 1.4 2009/12/14 03:04:33 matt Exp $") #endif /* LIBC_SCCS and not lint */ PSEUDO(__semctl,compat_14___semctl)
0xffea/MINIX3
2,208
lib/libc/compat/arch/mips/sys/compat_sigreturn.S
/* $NetBSD: compat_sigreturn.S,v 1.2 2009/12/14 03:04:33 matt Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ralph Campbell. * * 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) #if 0 RCSID("from: @(#)sigreturn.s 8.1 (Berkeley) 6/4/93") #else RCSID("$NetBSD: compat_sigreturn.S,v 1.2 2009/12/14 03:04:33 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ /* * We must preserve the state of the registers as the user has set them up. */ WARN_REFERENCES(sigreturn, \ "warning: reference to compatibility sigreturn()") PSEUDO(sigreturn,compat_13_sigreturn13)
0xffea/MINIX3
2,354
lib/libc/compat/arch/mips/sys/compat_sigpending.S
/* $NetBSD: compat_sigpending.S,v 1.2 2009/12/14 03:04:33 matt Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ralph Campbell. * * 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. */ #include "SYS.h" #include "assym.h" #if defined(LIBC_SCCS) && !defined(lint) #if 0 RCSID("from: @(#)sigpending.s 8.1 (Berkeley) 6/4/93") #else RCSID("$NetBSD: compat_sigpending.S,v 1.2 2009/12/14 03:04:33 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ WARN_REFERENCES(sigpending, \ "warning: reference to compatibility sigpending(); include <signal.h> for correct reference") LEAF(sigpending) PIC_PROLOGUE(sigpending) SYSTRAP(compat_13_sigpending13) bne a3, zero, 1f INT_S v0, _OFFSETOF_SC_ONSTACK(a0) move v0, zero PIC_RETURN() 1: PIC_TAILCALL(__cerror) END(sigpending)
0xffea/MINIX3
2,137
lib/libc/compat/arch/mips/sys/compat___sigreturn14.S
/* $NetBSD: compat___sigreturn14.S,v 1.2 2009/12/14 03:04:33 matt Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ralph Campbell. * * 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) #if 0 RCSID("from: @(#)sigreturn.s 8.1 (Berkeley) 6/4/93") #else RCSID("$NetBSD: compat___sigreturn14.S,v 1.2 2009/12/14 03:04:33 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ /* * We must preserve the state of the registers as the user has set them up. */ PSEUDO(__sigreturn14,compat_16___sigreturn14)
0xffea/MINIX3
2,360
lib/libc/compat/arch/mips/sys/compat_sigsuspend.S
/* $NetBSD: compat_sigsuspend.S,v 1.2 2009/12/14 03:04:33 matt Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ralph Campbell. * * 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) #if 0 RCSID("from: @(#)sigsuspend.s 8.1 (Berkeley) 6/4/93") #else RCSID("$NetBSD: compat_sigsuspend.S,v 1.2 2009/12/14 03:04:33 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ WARN_REFERENCES(sigsuspend, \ "warning: reference to compatibility sigsuspend(); include <signal.h> for correct reference") LEAF(sigsuspend) PIC_PROLOGUE(sigsuspend) INT_L a0, 0(a0) # indirect to mask arg SYSTRAP(compat_13_sigsuspend13) bne a3, zero, 1f move v0, zero # should not happen PIC_RETURN() 1: PIC_TAILCALL(__cerror) END(sigsuspend)
0xffea/MINIX3
1,979
lib/libc/compat/arch/mips/sys/compat_sigaction.S
/* $NetBSD: compat_sigaction.S,v 1.3 2009/12/14 01:07:42 matt Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) RCSID("$NetBSD: compat_sigaction.S,v 1.3 2009/12/14 01:07:42 matt Exp $") #endif /* LIBC_SCCS and not lint */ WARN_REFERENCES(sigaction, \ "warning: reference to compatibility sigaction(); include <signal.h> for correct reference") PSEUDO(sigaction,compat_13_sigaction13)
0xffea/MINIX3
2,617
lib/libc/compat/arch/mips/sys/compat_sigprocmask.S
/* $NetBSD: compat_sigprocmask.S,v 1.2 2009/12/14 03:04:33 matt Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ralph Campbell. * * 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) #if 0 RCSID("from: @(#)sigprocmask.s 8.1 (Berkeley) 6/4/93") #else RCSID("$NetBSD: compat_sigprocmask.S,v 1.2 2009/12/14 03:04:33 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ WARN_REFERENCES(sigprocmask, \ "warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference") LEAF(sigprocmask) # sigprocmask(how, new, old) sigset_t *new, *old; PIC_PROLOGUE(sigprocmask) bne a1, zero, gotptr # if new sigset pointer not null li a0, 1 # how = SIG_BLOCK b doit # mask = zero gotptr: INT_L a1, 0(a1) # indirect to new mask arg doit: SYSTRAP(compat_13_sigprocmask13) bne a3, zero, err beq a2, zero, out # test if old mask requested INT_S v0, 0(a2) # store old mask out: move v0, zero PIC_RETURN() err: PIC_TAILCALL(__cerror) END(sigprocmask)
0xffea/MINIX3
1,960
lib/libc/compat/arch/mips/sys/compat_msgctl.S
/* $NetBSD: compat_msgctl.S,v 1.3 2009/12/14 01:07:42 matt Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) RCSID("$NetBSD: compat_msgctl.S,v 1.3 2009/12/14 01:07:42 matt Exp $") #endif /* LIBC_SCCS and not lint */ WARN_REFERENCES(msgctl, \ "warning: reference to compatibility msgctl(); include <sys/msg.h> for correct reference") PSEUDO(msgctl,compat_14_msgctl)
0xffea/MINIX3
2,182
lib/libc/compat/arch/mips/sys/compat___sigtramp1.S
/* $NetBSD: compat___sigtramp1.S,v 1.4 2009/12/14 03:04:33 matt Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) RCSID("$NetBSD: compat___sigtramp1.S,v 1.4 2009/12/14 03:04:33 matt Exp $") #endif /* LIBC_SCCS and not lint */ /* * The MIPS signal trampoline is invoked only to return from * the signal; the kernel calls the signal handler directly. * * On entry, stack looks like: * * sp-> sigcontext structure */ LEAF_NOPROFILE(__sigtramp_sigcontext_1) move a0, sp /* address of sigcontext */ SYSTRAP(compat_16___sigreturn14) /* and do sigreturn */ move a0, v0 /* exit with errno */ SYSTRAP(exit) /* if sigreturn fails */ END(__sigtramp_sigcontext_1)
0xffea/MINIX3
1,960
lib/libc/compat/arch/mips/sys/compat_shmctl.S
/* $NetBSD: compat_shmctl.S,v 1.3 2009/12/14 01:07:42 matt Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) RCSID("$NetBSD: compat_shmctl.S,v 1.3 2009/12/14 01:07:42 matt Exp $") #endif /* LIBC_SCCS and not lint */ WARN_REFERENCES(shmctl, \ "warning: reference to compatibility shmctl(); include <sys/shm.h> for correct reference") PSEUDO(shmctl,compat_14_shmctl)
0xffea/MINIX3
2,513
lib/libc/compat/arch/mips/sys/compat_Ovfork.S
/* $NetBSD: compat_Ovfork.S,v 1.2 2009/12/14 03:04:33 matt Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ralph Campbell. * * 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) #if 0 RCSID("from: @(#)Ovfork.s 8.1 (Berkeley) 6/4/93") #else RCSID("$NetBSD: compat_Ovfork.S,v 1.2 2009/12/14 03:04:33 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ WARN_REFERENCES(vfork, \ "warning: reference to compatibility vfork(); include <unistd.h> for correct reference") /* * pid = vfork(); * * v1 == 0 in parent process, v1 == 1 in child process. * v0 == pid of child in parent, v0 == pid of parent in child. */ LEAF(vfork) PIC_PROLOGUE(vfork) SYSTRAP(vfork) # system call number for vfork beq a3, zero, 1f # jump if no errors PIC_TAILCALL(__cerror) 1: beq v1, zero, 2f # parent process ? move v0, zero # return zero in child 2: PIC_RETURN() END(vfork)
0xffea/MINIX3
1,824
lib/libc/compat/arch/mips/sys/compat_quotactl.S
/* $NetBSD: compat_quotactl.S,v 1.2 2011/03/06 17:08:14 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(quotactl, \ "warning: reference to compatibility quotactl(); include <sys/quota.h> for correct reference") PSEUDO(quotactl,compat_50_quotactl)
0xffea/MINIX3
2,817
lib/libc/compat/arch/mips/gen/compat_sigsetjmp.S
/* $NetBSD: compat_sigsetjmp.S,v 1.2 2009/12/14 03:04:33 matt Exp $ */ /*- * Copyright (c) 1991, 1993, 1995, * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Havard Eidnes. * * 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. */ #include <sys/syscall.h> #include <mips/asm.h> #include <mips/regdef.h> #include "assym.h" #if defined(LIBC_SCCS) && !defined(lint) #if 0 ASMSTR("from: @(#)setjmp.s 8.1 (Berkeley) 6/4/93") #else ASMSTR("$NetBSD: compat_sigsetjmp.S,v 1.2 2009/12/14 03:04:33 matt Exp $") #endif #endif /* LIBC_SCCS and not lint */ /* * C library -- sigsetjmp, siglongjmp * * siglongjmp(a,v) * will generate a "return(v)" from * the last call to * sigsetjmp(a, savemask) * by restoring registers from the stack, * and dependent on savemask restores the * signal mask. */ LEAF(sigsetjmp) SETUP_GP SETUP_GP64(t0, sigsetjmp) INT_S a1, _OFFSETOF_SC_MASK13(a0) # save "savemask" bne a1, 0x0, 1f # do saving of signal mask? PTR_LA t9, _C_LABEL(_setjmp) jr t9 1: PTR_LA t9, _C_LABEL(setjmp) jr t9 END(sigsetjmp) LEAF(siglongjmp) SETUP_GP SETUP_GP64(t0, siglongjmp) INT_L t1, _OFFSETOF_SC_MASK13(a0) # get "savemask" bne t1, 0x0, 1f # restore signal mask? PTR_LA t9, _C_LABEL(_longjmp) jr t9 1: PTR_LA t9, _C_LABEL(longjmp) jr t9 END(siglongjmp)
0xffea/MINIX3
5,248
lib/libc/compat/arch/mips/gen/compat_setjmp.S
/* $NetBSD: compat_setjmp.S,v 1.2 2009/12/14 03:04:33 matt Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ralph Campbell. * * 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. */ #include <sys/syscall.h> #include <mips/asm.h> #include "assym.h" #if defined(LIBC_SCCS) && !defined(lint) #if 0 RCSID("from: @(#)setjmp.s 8.1 (Berkeley) 6/4/93") #else RCSID("$NetBSD: compat_setjmp.S,v 1.2 2009/12/14 03:04:33 matt 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> */ #define SETJMP_FRAME_SIZE (CALLFRAME_SIZ + STACK_T_SIZE) NON_LEAF(setjmp, SETJMP_FRAME_SIZE, ra) .mask 0x80010000, (CALLFRAME_RA - CALLFRAME_SIZ) SETUP_GP PTR_SUBU sp, sp, SETJMP_FRAME_SIZE # allocate stack frame SAVE_GP(CALLFRAME_GP) SETUP_GP64(CALLFRAME_GP, setjmp) REG_S ra, CALLFRAME_RA(sp) # save RA REG_S s0, CALLFRAME_S0(sp) # save S0 move s0, a0 # save sigcontext /* Get the signal mask. */ move a0, zero # get current sigmask jal _C_LABEL(sigblock) nop INT_S v0, _OFFSETOF_SC_MASK13(s0) # save sc_mask13 /* Get the signal stack. */ move a0, zero PTR_ADDU a1, sp, CALLFRAME_SIZ # pointer to stack_t jal _C_LABEL(__sigaltstack14) move a0, s0 # restore jmpbuf INT_L v1, CALLFRAME_SIZ+_OFFSETOF_STACK_T_FLAGS(sp) # get old ss_onstack and v1, v1, SS_ONSTACK # extract onstack flag INT_S v1, _OFFSETOF_SC_ONSTACK(a0) # save it in sc_onstack REG_L s0, CALLFRAME_S0(sp) # restore S0 REG_L ra, CALLFRAME_RA(sp) # restore RA blt v0, zero, botch # check for sigaltstack() error nop /* * We know we won't need this routine's GP anymore. */ RESTORE_GP64 PTR_ADDU sp, sp, SETJMP_FRAME_SIZE # pop stack frame REG_PROLOGUE REG_S ra, _OFFSETOF_SC_PC(a0) # sc_pc = return address REG_LI v0, 0xACEDBADE # sigcontext magic number REG_S v0, _OFFSETOF_SC_REGS(a0) # saved in sc_regs[0] REG_S s0, _OFFSETOF_SC_REGS_S0(a0) REG_S s1, _OFFSETOF_SC_REGS_S1(a0) REG_S s2, _OFFSETOF_SC_REGS_S2(a0) REG_S s3, _OFFSETOF_SC_REGS_S3(a0) REG_S s4, _OFFSETOF_SC_REGS_S4(a0) REG_S s5, _OFFSETOF_SC_REGS_S5(a0) REG_S s6, _OFFSETOF_SC_REGS_S6(a0) REG_S s7, _OFFSETOF_SC_REGS_S7(a0) REG_S gp, _OFFSETOF_SC_REGS_GP(a0) REG_S sp, _OFFSETOF_SC_REGS_SP(a0) REG_S s8, _OFFSETOF_SC_REGS_S8(a0) li v0, 1 # be nice if we could tell INT_S v0, _OFFSETOF_SC_FPUSED(a0) # sc_fpused = 1 cfc1 v0, $31 INT_S v0, _OFFSETOF_SC_FPREGS_FCSR(a0) #if defined(__mips_o32) || defined(__mips_o64) || defined(__mips_n32) FP_S $f20, _OFFSETOF_SC_FPREGS_F20(a0) FP_S $f22, _OFFSETOF_SC_FPREGS_F22(a0) #endif #if defined(__mips_o32) || defined(__mips_o64) FP_S $f21, _OFFSETOF_SC_FPREGS_F21(a0) FP_S $f23, _OFFSETOF_SC_FPREGS_F23(a0) #endif #if defined(__mips_n32) || defined(__mips_n64) FP_S $f24, _OFFSETOF_SC_FPREGS_F24(a0) FP_S $f26, _OFFSETOF_SC_FPREGS_F26(a0) FP_S $f28, _OFFSETOF_SC_FPREGS_F28(a0) FP_S $f30, _OFFSETOF_SC_FPREGS_F30(a0) #endif #if defined(__mips_n64) FP_S $f25, _OFFSETOF_SC_FPREGS_F25(a0) FP_S $f27, _OFFSETOF_SC_FPREGS_F27(a0) FP_S $f29, _OFFSETOF_SC_FPREGS_F29(a0) FP_S $f31, _OFFSETOF_SC_FPREGS_F31(a0) #endif REG_EPILOGUE j ra move v0, zero botch: jal _C_LABEL(abort) END(setjmp) LEAF(longjmp) SETUP_GP PTR_SUBU sp, sp, CALLFRAME_SIZ SAVE_GP(CALLFRAME_S0) SETUP_GP64(s0, longjmp) REG_PROLOGUE /* save return value in sc_regs[_R_V0] */ REG_S a1, _OFFSETOF_SC_REGS_V0(a0) REG_EPILOGUE li v0, SYS_compat_13_sigreturn13 syscall jal _C_LABEL(longjmperror) jal _C_LABEL(abort) END(longjmp)
0xffea/MINIX3
1,696
lib/libc/compat/arch/powerpc/sys/compat___semctl.S
/* $NetBSD: compat___semctl.S,v 1.2 2008/04/28 20:22:58 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" PSEUDO(__semctl,compat_14___semctl)
0xffea/MINIX3
2,236
lib/libc/compat/arch/powerpc/sys/compat___sigtramp1.S
/* $NetBSD: compat___sigtramp1.S,v 1.3 2011/01/15 07:31:13 matt Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" #include "assym.h" #if defined(LIBC_SCCS) __RCSID("$NetBSD: compat___sigtramp1.S,v 1.3 2011/01/15 07:31:13 matt Exp $") #endif /* * On entry, stack and registers look like: * * r3 signal number * r4 signal specific code * r5 pointer to sigcontext structure * lr address of handler * * sp-> sigcontext structure */ ENTRY_NOPROFILE(__sigtramp_sigcontext_1) addi %r1,%r1,-CALLFRAMELEN /* space for callee */ blrl /* call handler */ addi %r3,%r1,CALLFRAMELEN /* compute address of sigcontext */ _DOSYSCALL(compat_16___sigreturn14) /* and call sigreturn */ _DOSYSCALL(exit) /* or exit with errno if failed */ END(__sigtramp_sigcontext_1)
0xffea/MINIX3
1,812
lib/libc/compat/arch/powerpc/sys/compat_shmctl.S
/* $NetBSD: compat_shmctl.S,v 1.2 2008/04/28 20:22:58 martin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(shmctl, \ "warning: reference to compatibility shmctl(); include <sys/shm.h> for correct reference") PSEUDO(shmctl,compat_14_shmctl)
0xffea/MINIX3
1,824
lib/libc/compat/arch/powerpc/sys/compat_quotactl.S
/* $NetBSD: compat_quotactl.S,v 1.2 2011/03/06 17:08:14 bouyer Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" WARN_REFERENCES(quotactl, \ "warning: reference to compatibility quotactl(); include <sys/quota.h> for correct reference") PSEUDO(quotactl,compat_50_quotactl)
0xffea/MINIX3
1,553
lib/libc/arch/m68k/sys/_lwp_getprivate.S
/* $NetBSD: _lwp_getprivate.S,v 1.2 2008/04/28 20:22:56 martin Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" SYSCALL(_lwp_getprivate) #ifdef __SVR4_ABI__ movl %d0,%a0 #endif rts
0xffea/MINIX3
2,792
lib/libc/arch/m68k/sys/ptrace.S
/* $NetBSD: ptrace.S,v 1.11 2003/08/07 16:42:14 agc Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * the Systems Programming Group of the University of Utah Computer * Science Department. * * 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) #if 0 RCSID("from: @(#)ptrace.s 5.1 (Berkeley) 5/12/90") #else RCSID("$NetBSD: ptrace.S,v 1.11 2003/08/07 16:42:14 agc Exp $") #endif #endif /* LIBC_SCCS and not lint */ #ifdef _REENTRANT .globl _C_LABEL(__errno) #else .globl _C_LABEL(errno) #endif ENTRY(ptrace) #ifdef _REENTRANT #if defined(PIC) && !defined(__ELF__) movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a0 lea %pc@(0,%a0:l),%a0 movl %a0@(_C_LABEL(__errno):l),%a0 jsr %a0@ #else jbsr PIC_PLT(_C_LABEL(__errno)) #endif /* PIC */ #ifndef __SVR4_ABI__ movl %d0,%a0 #endif clrl %a0@ #else #ifdef PIC #ifdef __ELF__ lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a0 movl %a0@(_C_LABEL(errno)@GOT:w),%a0 #else movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a0 lea %pc@(0,%a0:l),%a0 movl %a0@(_C_LABEL(errno):w),%a0 #endif clrl %a0@ #else clrl _C_LABEL(errno) #endif /* PIC */ #endif /* _REENTRANT */ movl #SYS_ptrace,%d0 trap #0 jcs err rts err: jra PIC_PLT(CERROR)
0xffea/MINIX3
2,555
lib/libc/arch/m68k/sys/__clone.S
/* $NetBSD: __clone.S,v 1.3 2008/04/28 20:22:56 martin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Steve C. Woodford. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include <sys/errno.h> #include "SYS.h" #ifdef WEAK_ALIAS WEAK_ALIAS(clone, __clone) #endif /* * int clone(int (*fn)(void *), void *stack, int flags, void *arg); */ ENTRY(__clone) movl %sp@(4),%d0 /* NULL function pointer? */ jeq 2f /* Yup, bomb out */ movl %d0,%a1 movl %sp@(8),%d0 /* NULL stack? */ jeq 2f /* Yup, bomb out */ movl %d0,%a0 movl %sp@(16),%a0@- /* Push clone's `arg' on its new stack */ lea %a0@(-12),%a0 /* Fake syscall args for the clone */ movl %a0,%sp@- /* Syscall arg: stack */ movl %sp@(16),%sp@- /* Syscall arg: flags */ clrl %sp@- /* Fake return address */ SYSTRAP(__clone) /* Note: `fn' in a1@ is preserved */ lea %sp@(12),%sp /* Zap syscall args */ jcs 3f /* Punt if syscall failed */ tstl %d0 jne 1f /* We're the parent, just return. */ jsr %a1@ /* We're the clone, call the function */ movl %d0,%sp@- /* If clone returns, invoke _exit(3) */ jbsr PIC_PLT(_C_LABEL(_exit)) /* NOTREACHED */ 1: rts 2: movl #EINVAL,%d0 3: jra PIC_PLT(CERROR)
0xffea/MINIX3
2,156
lib/libc/arch/m68k/sys/exect.S
/* $NetBSD: exect.S,v 1.7 2003/08/07 16:42:14 agc Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * the Systems Programming Group of the University of Utah Computer * Science Department. * * 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. */ #include "SYS.h" #include <machine/psl.h> #if defined(LIBC_SCCS) && !defined(lint) #if 0 RCSID("from: @(#)exect.s 5.1 (Berkeley) 5/12/90") #else RCSID("$NetBSD: exect.S,v 1.7 2003/08/07 16:42:14 agc Exp $") #endif #endif /* LIBC_SCCS and not lint */ ENTRY(exect) movl #SYS_execve,%d0 trap #0 jra PIC_PLT(CERROR) /* exect(file, argv, env) */
0xffea/MINIX3
2,759
lib/libc/arch/m68k/sys/brk.S
/* $NetBSD: brk.S,v 1.15 2003/12/26 11:21:48 martin Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * the Systems Programming Group of the University of Utah Computer * Science Department. * * 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) #if 0 RCSID("from: @(#)brk.s 5.1 (Berkeley) 5/12/90") #else RCSID("$NetBSD: brk.S,v 1.15 2003/12/26 11:21:48 martin Exp $") #endif #endif /* LIBC_SCCS and not lint */ .globl _end .globl _C_LABEL(__minbrk) .globl CURBRK #ifdef WEAK_ALIAS WEAK_ALIAS(brk, _brk) #endif .data _C_LABEL(__minbrk): .long _end .text ENTRY(_brk) #ifdef PIC #ifdef __ELF__ lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a1 movl %a1@(_C_LABEL(__minbrk)@GOT:w),%a0 #else movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a1 lea %pc@(0,a1:l),%a1 movl %a1@(_C_LABEL(__minbrk):w),%a0 #endif movl %a0@,%d0 #else movl _C_LABEL(__minbrk),%d0 #endif cmpl %sp@(4),%d0 jls ok movl %d0,%sp@(4) ok: movl #SYS_break,%d0 trap #0 jcs err #ifdef PIC #ifdef __ELF__ movl %a1@(CURBRK@GOT:w),%a0 #else movl %a1@(CURBRK:w),%a0 #endif movl %sp@(4),%a0@ #else movl %sp@(4),CURBRK #endif clrl %d0 rts err: jra PIC_PLT(CERROR)
0xffea/MINIX3
3,378
lib/libc/arch/m68k/sys/__vfork14.S
/* $NetBSD: __vfork14.S,v 1.9 2003/08/07 16:42:14 agc Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * the Systems Programming Group of the University of Utah Computer * Science Department. * * 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) #if 0 RCSID("from: @(#)Ovfork.s 5.1 (Berkeley) 5/12/90") #else RCSID("$NetBSD: __vfork14.S,v 1.9 2003/08/07 16:42:14 agc Exp $") #endif #endif /* LIBC_SCCS and not lint */ /* * @(#)vfork.s 4.1 (Berkeley) 12/21/80 * C library -- vfork */ /* * pid = vfork(); * * d1 == 0 in parent process, d1 == 1 in child process. * d0 == pid of child in parent, d0 == pid of parent in child. * * trickery here, due to keith sklower, uses ret to clear the stack, * and then returns with a jump indirect, since only one person can return * with a ret off this stack... we do the ret before we vfork! */ ENTRY(__vfork14) movl %sp@+,%a1 movl #SYS___vfork14,%d0 trap #0 jcs err subql #1,%d1 /* from 1 to 0 in child, 0 to -1 in parent */ andl %d1,%d0 jmp %a1@ err: #ifdef _REENTRANT .globl _C_LABEL(__errno) movl %a1,%sp@- movl %d0,%sp@- #if defined(PIC) && !defined(__ELF__) movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a1 lea %pc@(0,a1:l),%a1 movl %a1@(_C_LABEL(__errno):l),%a1 jsr %a1@ #else jbsr PIC_PLT(_C_LABEL(__errno)) #endif /* PIC */ #ifdef __SVR4_ABI__ movl %sp@+,%a0@ #else movl %d0,%a1 movl %sp@+,%a1@ #endif movl %sp@+,%a1 #else .globl _C_LABEL(errno) #ifdef PIC #ifdef __ELF__ lea %pc@(_GLOBAL_OFFSET_TABLE_@GOTPC),%a0 movl %a0@(_C_LABEL(errno)@GOT:w),%a0 #else movl #_C_LABEL(_GLOBAL_OFFSET_TABLE_),%a0 lea %pc@(0,a0:l),%a0 movl %a0@(_C_LABEL(errno):w),%a0 #endif movl %d0,%a0@ #else movl %d0,_C_LABEL(errno) #endif /* PIC */ #endif /* _REENTRANT */ moveq #-1,%d0 jmp %a1@
0xffea/MINIX3
1,533
lib/libc/arch/m68k/sys/shmat.S
/* $NetBSD: shmat.S,v 1.2 2008/04/28 20:22:56 martin Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include "SYS.h" SYSCALL(shmat) #ifdef __SVR4_ABI__ movl %d0,%a0 #endif rts
0xffea/MINIX3
2,117
lib/libc/arch/m68k/sys/syscall.S
/* $NetBSD: syscall.S,v 1.7 2003/08/07 16:42:14 agc Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * the Systems Programming Group of the University of Utah Computer * Science Department. * * 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. */ #include "SYS.h" #if defined(LIBC_SCCS) && !defined(lint) #if 0 RCSID("from: @(#)syscall.s 5.1 (Berkeley) 5/12/90") #else RCSID("$NetBSD: syscall.S,v 1.7 2003/08/07 16:42:14 agc Exp $") #endif #endif /* LIBC_SCCS and not lint */ ENTRY(syscall) clrl %d0 trap #0 jcs err rts err: jra PIC_PLT(CERROR)