diff options
Diffstat (limited to 'lib/libc/ia64/sys')
-rw-r--r-- | lib/libc/ia64/sys/Makefile.inc | 13 | ||||
-rw-r--r-- | lib/libc/ia64/sys/Ovfork.S | 36 | ||||
-rw-r--r-- | lib/libc/ia64/sys/brk.S | 53 | ||||
-rw-r--r-- | lib/libc/ia64/sys/cerror.S | 47 | ||||
-rw-r--r-- | lib/libc/ia64/sys/exect.S | 36 | ||||
-rw-r--r-- | lib/libc/ia64/sys/fork.S | 35 | ||||
-rw-r--r-- | lib/libc/ia64/sys/pipe.S | 39 | ||||
-rw-r--r-- | lib/libc/ia64/sys/ptrace.S | 39 | ||||
-rw-r--r-- | lib/libc/ia64/sys/sbrk.S | 53 | ||||
-rw-r--r-- | lib/libc/ia64/sys/setlogin.S | 40 | ||||
-rw-r--r-- | lib/libc/ia64/sys/sigreturn.S | 39 | ||||
-rw-r--r-- | lib/libc/ia64/sys/syscall.S | 33 |
12 files changed, 463 insertions, 0 deletions
diff --git a/lib/libc/ia64/sys/Makefile.inc b/lib/libc/ia64/sys/Makefile.inc new file mode 100644 index 0000000..7d9a6c6 --- /dev/null +++ b/lib/libc/ia64/sys/Makefile.inc @@ -0,0 +1,13 @@ +# $FreeBSD$ + +MDASM+= Ovfork.S brk.S cerror.S exect.S fork.S pipe.S ptrace.S \ + sbrk.S setlogin.S sigreturn.S syscall.S + +# Don't generate default code for these syscalls: +NOASM= __semctl.o break.o exit.o ftruncate.o getdomainname.o getlogin.o \ + lseek.o mlockall.o mmap.o msgctl.o msgget.o msgrcv.o msgsnd.o \ + munlockall.o openbsd_poll.o pread.o pwrite.o semconfig.o semget.o \ + semop.o setdomainname.o shmat.o shmctl.o shmdt.o shmget.o sstk.o \ + truncate.o uname.o vfork.o yield.o + +PSEUDO= _getlogin.o _exit.o diff --git a/lib/libc/ia64/sys/Ovfork.S b/lib/libc/ia64/sys/Ovfork.S new file mode 100644 index 0000000..1e39ef7 --- /dev/null +++ b/lib/libc/ia64/sys/Ovfork.S @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2000 Doug Rabson + * 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 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. + * + * $FreeBSD$ + */ +#include "SYS.h" + +SYSCALL(vfork) + ;; + cmp.ne p6,p0=ret1,r0 /* ret1!=0 for child */ + ;; +(p6) mov ret0=r0 + br.ret.sptk.few rp +END(vfork) diff --git a/lib/libc/ia64/sys/brk.S b/lib/libc/ia64/sys/brk.S new file mode 100644 index 0000000..a8d910c --- /dev/null +++ b/lib/libc/ia64/sys/brk.S @@ -0,0 +1,53 @@ +/* $FreeBSD$ */ +/* $NetBSD: brk.S,v 1.4 1996/10/17 03:08:15 cgd 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" + + .globl _end +IMPORT(curbrk, 8) + + .data +EXPORT(minbrk) + .quad _end + + .text +ENTRY(brk, 1) + add r14=@ltoff(minbrk),gp ;; + ld8 r14=[r14] ;; + ld8 r14=[r14] ;; + cmp.ltu p6,p0=in0,r14 ;; +(p6) mov in0=r14 + CALLSYS_ERROR(break) + add r14=@ltoff(curbrk),gp ;; + ld8 r14=[r14] ;; + st8 [r14]=in0 + mov ret0=0 + br.ret.sptk.few rp +END(brk) diff --git a/lib/libc/ia64/sys/cerror.S b/lib/libc/ia64/sys/cerror.S new file mode 100644 index 0000000..da35bd7 --- /dev/null +++ b/lib/libc/ia64/sys/cerror.S @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2000 Doug Rabson + * 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 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. + * + * $FreeBSD$ + */ + +#include <machine/asm.h> + + +ENTRY(.cerror, 0) + alloc loc0=ar.pfs,0,3,1,0 + ;; + mov loc1=rp + mov loc2=ret0 + mov out0=ret0 + ;; + br.call.sptk.few rp=__error + st4 [ret0]=loc2 + ;; + mov ret0=-1 + mov ar.pfs=loc0 + mov rp=loc1 + ;; + br.ret.sptk.few rp +END(.cerror) diff --git a/lib/libc/ia64/sys/exect.S b/lib/libc/ia64/sys/exect.S new file mode 100644 index 0000000..d1c68b4b --- /dev/null +++ b/lib/libc/ia64/sys/exect.S @@ -0,0 +1,36 @@ +/* $FreeBSD$ */ +/* $NetBSD: exect.S,v 1.2 1996/10/17 03:08:18 cgd 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" + +ENTRY(exect, 3) + CALLSYS_ERROR(execve) + br.ret.sptk.few rp +END(exect) diff --git a/lib/libc/ia64/sys/fork.S b/lib/libc/ia64/sys/fork.S new file mode 100644 index 0000000..2657e0d --- /dev/null +++ b/lib/libc/ia64/sys/fork.S @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2000 Doug Rabson + * 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 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. + * + * $FreeBSD$ + */ +#include "SYS.h" + +SYSCALL(fork) + cmp.ne p7,p0=ret1,r0 /* ret1!=0 for child */ + ;; +(p7) mov ret0=r0 + br.ret.sptk.few rp +END(fork) diff --git a/lib/libc/ia64/sys/pipe.S b/lib/libc/ia64/sys/pipe.S new file mode 100644 index 0000000..3254341 --- /dev/null +++ b/lib/libc/ia64/sys/pipe.S @@ -0,0 +1,39 @@ +/* $FreeBSD$ */ +/* $NetBSD: pipe.S,v 1.1 1995/02/10 17:50:35 cgd 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" + +SYSCALL(pipe) + .regstk 1,0,0,0 + st4 [in0]=ret0,4 ;; + st4 [in0]=ret1 + mov ret0=0 + br.ret.sptk.few rp +END(pipe) diff --git a/lib/libc/ia64/sys/ptrace.S b/lib/libc/ia64/sys/ptrace.S new file mode 100644 index 0000000..913a22d --- /dev/null +++ b/lib/libc/ia64/sys/ptrace.S @@ -0,0 +1,39 @@ +/* $FreeBSD$ */ +/* $NetBSD: ptrace.S,v 1.4 1996/11/08 00:51:24 cgd 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" + +ENTRY(ptrace, 4) + add r14=@ltoff(errno),gp ;; + ld8 r14=[r14] ;; + st4 [r14]=r0 + CALLSYS_ERROR(ptrace) + br.ret.sptk.few rp +END(ptrace) diff --git a/lib/libc/ia64/sys/sbrk.S b/lib/libc/ia64/sys/sbrk.S new file mode 100644 index 0000000..03e0766 --- /dev/null +++ b/lib/libc/ia64/sys/sbrk.S @@ -0,0 +1,53 @@ +/* $FreeBSD$ */ +/* $NetBSD: sbrk.S,v 1.4 1996/10/17 03:08:20 cgd 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" + + .globl _end + + .data +EXPORT(curbrk) + .quad _end + + .text +ENTRY(sbrk, 1) + alloc r14=ar.pfs,1,2,0,0 + + add loc0=@ltoff(curbrk),gp ;; + ld8 loc0=[loc0] ;; + ld8 loc1=[loc0] + cmp.eq p6,p0=in0,r0 +(p6) br.dpnt.few 1f + add in0=r14,in0 + CALLSYS_ERROR(break) + st8 [loc0]=in0 +1: mov ret0=loc1 + br.ret.sptk.few rp +END(sbrk) diff --git a/lib/libc/ia64/sys/setlogin.S b/lib/libc/ia64/sys/setlogin.S new file mode 100644 index 0000000..2f80ddf --- /dev/null +++ b/lib/libc/ia64/sys/setlogin.S @@ -0,0 +1,40 @@ +/* $FreeBSD$ */ +/* $NetBSD: setlogin.S,v 1.1 1995/02/10 17:50:39 cgd 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" + +IMPORT(_logname_valid, 4) /* in getlogin() */ + +SYSCALL(setlogin) + add r14=@ltoff(_logname_valid),gp ;; + ld8 r14=[r14] ;; + st4 [r14]=r0 /* clear it */ + br.ret.sptk.few rp +END(setlogin) diff --git a/lib/libc/ia64/sys/sigreturn.S b/lib/libc/ia64/sys/sigreturn.S new file mode 100644 index 0000000..57416b1 --- /dev/null +++ b/lib/libc/ia64/sys/sigreturn.S @@ -0,0 +1,39 @@ +/* $FreeBSD$ */ +/* $NetBSD: sigreturn.S,v 1.1 1995/02/10 17:50:42 cgd 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 ia64. + * (XXX PROFILING) + */ + +RSYSCALL(sigreturn) diff --git a/lib/libc/ia64/sys/syscall.S b/lib/libc/ia64/sys/syscall.S new file mode 100644 index 0000000..8e071f4 --- /dev/null +++ b/lib/libc/ia64/sys/syscall.S @@ -0,0 +1,33 @@ +/* $FreeBSD$ */ +/* $NetBSD: syscall.S,v 1.1 1995/02/10 17:50:44 cgd 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" + +RSYSCALL(syscall) |