More new compat layout fixes.

This commit is contained in:
christos 2006-03-11 19:26:29 +00:00
parent 2b52112d5a
commit 147db157f7
18 changed files with 658 additions and 4 deletions

View File

@ -0,0 +1,4 @@
# $NetBSD: Makefile.inc,v 1.1 2006/03/11 19:26:29 christos Exp $
.include "${.CURDIR}/compat/arch/ns32k/gen/Makefile.inc"
.include "${.CURDIR}/compat/arch/ns32k/sys/Makefile.inc"

View File

@ -0,0 +1,4 @@
# $NetBSD: Makefile.inc,v 1.1 2006/03/11 19:26:29 christos Exp $
# objects built from assembler sources (need lint stubs)
SRCS+= compat_setjmp.S compat_sigsetjmp.S

View File

@ -0,0 +1,72 @@
/* $NetBSD: compat_setjmp.S,v 1.1 2006/03/11 19:26:29 christos Exp $ */
/*
* Copyright (c) 1992 Helsinki University of Technology
* All Rights Reserved.
*
* 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.
*
* HELSINKI UNIVERSITY OF TECHNOLOGY ALLOWS FREE USE OF THIS SOFTWARE IN
* ITS "AS IS" CONDITION. HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIMS ANY
* LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
* USE OF THIS SOFTWARE.
*/
/*
* HISTORY
* 29-Apr-92 Johannes Helander (jvh) at Helsinki University of Technology
* Created.
*/
#include <machine/asm.h>
#include <machine/jmpbuf.h>
#if defined(LIBC_SCCS)
RCSID("$NetBSD: compat_setjmp.S,v 1.1 2006/03/11 19:26:29 christos Exp $")
#endif
ENTRY(setjmp)
movqd 0,tos
bsr _C_LABEL(sigblock)
adjspb -4
movd 4(sp),r2 /* jmp_buf */
movd 0(sp),JMP_BUF_PC(r2) /* pc of caller */
movd r0,JMP_BUF_SIGMASK(r2) /* save mask */
sprd sp,JMP_BUF_SP(r2)
sprd fp,JMP_BUF_FP(r2)
sprd sb,JMP_BUF_SB(r2)
movd r3,JMP_BUF_R3(r2) /* save registers r3-r7 */
movd r4,JMP_BUF_R4(r2)
movd r5,JMP_BUF_R5(r2)
movd r6,JMP_BUF_R6(r2)
movd r7,JMP_BUF_R7(r2)
movqd 0,r0
ret 0
ENTRY(longjmp)
movd 4(sp),r2 /* jmp_buf */
movd JMP_BUF_SIGMASK(r2),tos /* restore mask */
bsr _C_LABEL(sigsetmask)
adjspb -4
movd 4(sp),r2 /* jmp_buf */
movd 8(sp),r0 /* value */
lprd sp,JMP_BUF_SP(r2)
lprd fp,JMP_BUF_FP(r2)
lprd sb,JMP_BUF_SB(r2)
movd JMP_BUF_R3(r2),r3 /* load registers r3-r7 */
movd JMP_BUF_R4(r2),r4
movd JMP_BUF_R5(r2),r5
movd JMP_BUF_R6(r2),r6
movd JMP_BUF_R7(r2),r7
movd JMP_BUF_PC(r2),0(sp) /* patch return pc */
cmpqd 0,r0
bne 0f
movqd 1,r0
0: ret 0

View File

@ -0,0 +1,85 @@
/* $NetBSD: compat_sigsetjmp.S,v 1.1 2006/03/11 19:26:29 christos Exp $ */
/*
* Copyright (c) 1992 Helsinki University of Technology
* All Rights Reserved.
*
* 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.
*
* HELSINKI UNIVERSITY OF TECHNOLOGY ALLOWS FREE USE OF THIS SOFTWARE IN
* ITS "AS IS" CONDITION. HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIMS ANY
* LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
* USE OF THIS SOFTWARE.
*/
/*
* HISTORY
* 29-Apr-92 Johannes Helander (jvh) at Helsinki University of Technology
* Created.
*
* 05-Aug-94 Matthias Pfaller (leo@marco.de)
* Converted to sigsetjmp.S from setjmp.S
*/
#include <machine/asm.h>
#include <machine/jmpbuf.h>
#if defined(LIBC_SCCS)
RCSID("$NetBSD: compat_sigsetjmp.S,v 1.1 2006/03/11 19:26:29 christos Exp $")
#endif
ENTRY(sigsetjmp)
movd 4(sp),r2 /* jmp_buf */
movd 0(sp),JMP_BUF_PC(r2) /* pc of caller */
movd 8(sp),r1 /* savemask */
movd r1,JMP_BUF_SIGMASK+4(r2)
cmpqd 0,r1
beq 1f
movqd 0,tos
bsr _C_LABEL(sigblock)
adjspb -4
movd 4(sp),r2 /* jmp_buf */
movd r0,JMP_BUF_SIGMASK(r2) /* save mask */
1: sprd sp,JMP_BUF_SP(r2)
sprd fp,JMP_BUF_FP(r2)
sprd sb,JMP_BUF_SB(r2)
movd r3,JMP_BUF_R3(r2) /* save registers r3-r7 */
movd r4,JMP_BUF_R4(r2)
movd r5,JMP_BUF_R5(r2)
movd r6,JMP_BUF_R6(r2)
movd r7,JMP_BUF_R7(r2)
movqd 0,r0
ret 0
ENTRY(siglongjmp)
movd 4(sp),r2 /* jmp_buf */
cmpqd 0,JMP_BUF_SIGMASK+4(r2)
beq 1f
movd JMP_BUF_SIGMASK(r2),tos /* restore mask */
bsr _C_LABEL(sigsetmask)
adjspb -4
movd 4(sp),r2 /* jmp_buf */
1: movd 8(sp),r0 /* value */
lprd sp,JMP_BUF_SP(r2)
lprd fp,JMP_BUF_FP(r2)
lprd sb,JMP_BUF_SB(r2)
movd JMP_BUF_R3(r2),r3 /* load registers r3-r7 */
movd JMP_BUF_R4(r2),r4
movd JMP_BUF_R5(r2),r5
movd JMP_BUF_R6(r2),r6
movd JMP_BUF_R7(r2),r7
movd JMP_BUF_PC(r2),0(sp) /* patch return pc */
cmpqd 0,r0
bne 2f
movqd 1,r0
2: ret 0

View File

@ -0,0 +1,6 @@
# $NetBSD: Makefile.inc,v 1.1 2006/03/11 19:26:29 christos Exp $
SRCS+=compat_Ovfork.S compat___semctl.S compat___sigreturn14.S \
compat___sigtramp1.S compat_msgctl.S compat_shmctl.S compat_sigaction.S \
compat_sigpending.S compat_sigprocmask.S compat_sigreturn.S \
compat_sigsuspend.S

View File

@ -0,0 +1,52 @@
/* $NetBSD: compat_Ovfork.S,v 1.1 2006/03/11 19:26:29 christos Exp $ */
/*
* Copyright (c) 1992 Helsinki University of Technology
* All Rights Reserved.
*
* 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.
*
* HELSINKI UNIVERSITY OF TECHNOLOGY ALLOWS FREE USE OF THIS SOFTWARE IN
* ITS "AS IS" CONDITION. HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIMS ANY
* LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
* USE OF THIS SOFTWARE.
*/
/*
* HISTORY
* 29-Apr-92 Johannes Helander (jvh) at Helsinki University of Technology
* Created.
*/
#include "SYS.h"
#if defined(LIBC_SCCS)
RCSID("$NetBSD: compat_Ovfork.S,v 1.1 2006/03/11 19:26:29 christos Exp $")
#endif
WARN_REFERENCES(vfork, \
"warning: reference to compatibility vfork(); include <unistd.h> for correct reference")
/*
* r0 = pid of child in parent / pid of parent in child
* r1 = 0 in parent, 1 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!
* (This is not really true for NetBSD. NetBSD's vfork creates a new
* vm context for the child).
*/
ENTRY(vfork)
movd tos,r2
SYSTRAP(vfork)
bcc 0f
movd r2,tos
br _ASM_LABEL(cerror)
0: cmpqd 0,r1
beq 0f
movqd 0,r0
0: jump 0(r2)

View File

@ -0,0 +1,42 @@
/* $NetBSD: compat___semctl.S,v 1.1 2006/03/11 19:26:29 christos 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation 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 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)

View File

@ -0,0 +1,36 @@
/* $NetBSD: compat___sigreturn14.S,v 1.1 2006/03/11 19:26:29 christos Exp $ */
/*
* Copyright (c) 1992 Helsinki University of Technology
* All Rights Reserved.
*
* 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.
*
* HELSINKI UNIVERSITY OF TECHNOLOGY ALLOWS FREE USE OF THIS SOFTWARE IN
* ITS "AS IS" CONDITION. HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIMS ANY
* LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
* USE OF THIS SOFTWARE.
*/
/*
* HISTORY
* 29-Apr-92 Johannes Helander (jvh) at Helsinki University of Technology
* Created.
*/
#ifdef GPROF
/*
* We must preserve the state of the registers as the user has set them up.
*/
# define _SAVELIST r0,r1,r2
#endif
#include "SYS.h"
#if defined(LIBC_SCCS)
RCSID("$NetBSD: compat___sigreturn14.S,v 1.1 2006/03/11 19:26:29 christos Exp $")
#endif
PSEUDO(__sigreturn14,compat_16___sigreturn14)

View File

@ -0,0 +1,57 @@
/* $NetBSD: compat___sigtramp1.S,v 1.1 2006/03/11 19:26:29 christos 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 and Simon Burge.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation 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 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 ns32k signal trampoline is invoked only to return from
* the signal; the kernel calls the signal handler directly.
*
* On entry, stack looks like:
*
* sigcontext structure [12]
* pointer to sigcontext structure [8]
* signal specific code [4]
* sp-> signal number [0]
*/
ENTRY_NOPROFILE(__sigtramp_sigcontext_1)
addr 12(sp),4(sp) /* get pointer to sigcontext */
/* and put it in argument slot */
SYSTRAP(compat_16___sigreturn14) /* call sigreturn */
movd r0,4(sp) /* exit with errno */
SYSTRAP(exit) /* if sigreturn failed */

View File

@ -0,0 +1,45 @@
/* $NetBSD: compat_msgctl.S,v 1.1 2006/03/11 19:26:29 christos 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation 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 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)

View File

@ -0,0 +1,45 @@
/* $NetBSD: compat_shmctl.S,v 1.1 2006/03/11 19:26:29 christos 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation 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 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)

View File

@ -0,0 +1,45 @@
/* $NetBSD: compat_sigaction.S,v 1.1 2006/03/11 19:26:29 christos 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.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation 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 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)

View File

@ -0,0 +1,36 @@
/* $NetBSD: compat_sigpending.S,v 1.1 2006/03/11 19:26:29 christos Exp $ */
/*
* Copyright (c) 1992 Helsinki University of Technology
* All Rights Reserved.
*
* 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.
*
* HELSINKI UNIVERSITY OF TECHNOLOGY ALLOWS FREE USE OF THIS SOFTWARE IN
* ITS "AS IS" CONDITION. HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIMS ANY
* LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
* USE OF THIS SOFTWARE.
*/
/*
* HISTORY
* 29-Apr-92 Johannes Helander (jvh) at Helsinki University of Technology
* Created.
*/
#include "SYS.h"
#if defined(LIBC_SCCS)
RCSID("$NetBSD: compat_sigpending.S,v 1.1 2006/03/11 19:26:29 christos Exp $")
#endif
WARN_REFERENCES(sigpending, \
"warning: reference to compatibility sigpending(); include <signal.h> for correct reference")
_SYSCALL(sigpending,compat_13_sigpending13)
movd r0,0(S_ARG1) /* store old mask */
movqd 0,r0
ret 0

View File

@ -0,0 +1,48 @@
/* $NetBSD: compat_sigprocmask.S,v 1.1 2006/03/11 19:26:29 christos Exp $ */
/*
* Copyright (c) 1992 Helsinki University of Technology
* All Rights Reserved.
*
* 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.
*
* HELSINKI UNIVERSITY OF TECHNOLOGY ALLOWS FREE USE OF THIS SOFTWARE IN
* ITS "AS IS" CONDITION. HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIMS ANY
* LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
* USE OF THIS SOFTWARE.
*/
/*
* HISTORY
* 29-Apr-92 Johannes Helander (jvh) at Helsinki University of Technology
* Created.
*/
#include "SYS.h"
#if defined(LIBC_SCCS)
RCSID("$NetBSD: compat_sigprocmask.S,v 1.1 2006/03/11 19:26:29 christos Exp $")
#endif
WARN_REFERENCES(sigprocmask, \
"warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference")
ENTRY(sigprocmask)
movd S_ARG1,r1 /* fetch new sigset pointer */
cmpqd 0,r1 /* check new sigset pointer */
bne 0f /* if not null, indirect */
/* movqd 0,S_ARG1 /* null mask pointer: block empty set */
movqd 1,S_ARG0 /* SIG_BLOCK */
br 1f
0: movd 0(r1),S_ARG1 /* fetch indirect to new mask arg */
1: SYSTRAP(compat_13_sigprocmask13)
bcs _ASM_LABEL(cerror)
movd S_ARG2,r1 /* fetch old mask requested */
cmpqd 0,r1 /* test if old mask requested */
beq 2f
movd r0,0(r1) /* store old mask */
2: movqd 0,r0
ret 0

View File

@ -0,0 +1,39 @@
/* $NetBSD: compat_sigreturn.S,v 1.1 2006/03/11 19:26:29 christos Exp $ */
/*
* Copyright (c) 1992 Helsinki University of Technology
* All Rights Reserved.
*
* 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.
*
* HELSINKI UNIVERSITY OF TECHNOLOGY ALLOWS FREE USE OF THIS SOFTWARE IN
* ITS "AS IS" CONDITION. HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIMS ANY
* LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
* USE OF THIS SOFTWARE.
*/
/*
* HISTORY
* 29-Apr-92 Johannes Helander (jvh) at Helsinki University of Technology
* Created.
*/
#ifdef GPROF
/*
* We must preserve the state of the registers as the user has set them up.
*/
# define _SAVELIST r0,r1,r2
#endif
#include "SYS.h"
#if defined(LIBC_SCCS)
RCSID("$NetBSD: compat_sigreturn.S,v 1.1 2006/03/11 19:26:29 christos Exp $")
#endif
WARN_REFERENCES(sigreturn, \
"warning: reference to compatibility sigreturn()")
PSEUDO(sigreturn,compat_13_sigreturn13)

View File

@ -0,0 +1,38 @@
/* $NetBSD: compat_sigsuspend.S,v 1.1 2006/03/11 19:26:29 christos Exp $ */
/*
* Copyright (c) 1992 Helsinki University of Technology
* All Rights Reserved.
*
* 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.
*
* HELSINKI UNIVERSITY OF TECHNOLOGY ALLOWS FREE USE OF THIS SOFTWARE IN
* ITS "AS IS" CONDITION. HELSINKI UNIVERSITY OF TECHNOLOGY DISCLAIMS ANY
* LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
* USE OF THIS SOFTWARE.
*/
/*
* HISTORY
* 29-Apr-92 Johannes Helander (jvh) at Helsinki University of Technology
* Created.
*/
#include "SYS.h"
#if defined(LIBC_SCCS)
RCSID("$NetBSD: compat_sigsuspend.S,v 1.1 2006/03/11 19:26:29 christos Exp $")
#endif
WARN_REFERENCES(sigsuspend, \
"warning: reference to compatibility sigsuspend(); include <signal.h> for correct reference")
ENTRY(sigsuspend)
movd 0(S_ARG0),S_ARG0 /* indirect to mask arg */
SYSTRAP(compat_13_sigsuspend13)
bcs _ASM_LABEL(cerror)
movqd 0,r0 /* shouldn t happen */
ret 0

View File

@ -1,3 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2006/03/11 19:13:33 christos Exp $
# $NetBSD: Makefile.inc,v 1.2 2006/03/11 19:26:29 christos Exp $
.include "${.CURDIR}/compat/arch/i386/sys/Makefile.inc"
.include "${.CURDIR}/compat/arch/sh5/sys/Makefile.inc"

View File

@ -1,3 +1,3 @@
# $NetBSD: Makefile.inc,v 1.1 2006/03/11 18:59:21 christos Exp $
# $NetBSD: Makefile.inc,v 1.2 2006/03/11 19:26:29 christos Exp $
.include "${.CURDIR}/compat/arch/i386/sys/Makefile.inc"
.include "${.CURDIR}/compat/arch/x86_64/sys/Makefile.inc"