diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 1994-08-05 01:19:12 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 1994-08-05 01:19:12 +0000 |
commit | 2ceb2ce9eed6efe8076988a9e81722d6a920245d (patch) | |
tree | 3e3913f9a690f2310dfc0d620e8803f623b40b54 /lib/libc/i386/sys | |
parent | 4ea6250be3be954b7960a67df7430716857eff00 (diff) | |
download | src-2ceb2ce9eed6efe8076988a9e81722d6a920245d.tar.gz src-2ceb2ce9eed6efe8076988a9e81722d6a920245d.zip |
First crack at making libc work with the new make macros. It compiles on
my machine, and a simple static (genassym) and shared (sysctl) executable
both work. Still to be done: RPCand YP merge.
Notes
Notes:
svn path=/head/; revision=1849
Diffstat (limited to 'lib/libc/i386/sys')
-rw-r--r-- | lib/libc/i386/sys/Ovfork.S | 80 | ||||
-rw-r--r-- | lib/libc/i386/sys/brk.S | 91 | ||||
-rw-r--r-- | lib/libc/i386/sys/cerror.S | 56 | ||||
-rw-r--r-- | lib/libc/i386/sys/exect.S | 54 | ||||
-rw-r--r-- | lib/libc/i386/sys/fork.S | 50 | ||||
-rw-r--r-- | lib/libc/i386/sys/mount.S | 47 | ||||
-rw-r--r-- | lib/libc/i386/sys/pipe.S | 50 | ||||
-rw-r--r-- | lib/libc/i386/sys/ptrace.S | 60 | ||||
-rw-r--r-- | lib/libc/i386/sys/reboot.S | 46 | ||||
-rw-r--r-- | lib/libc/i386/sys/sbrk.S | 89 | ||||
-rw-r--r-- | lib/libc/i386/sys/setlogin.S | 58 | ||||
-rw-r--r-- | lib/libc/i386/sys/sigpending.S | 49 | ||||
-rw-r--r-- | lib/libc/i386/sys/sigprocmask.S | 66 | ||||
-rw-r--r-- | lib/libc/i386/sys/sigreturn.S | 56 | ||||
-rw-r--r-- | lib/libc/i386/sys/sigsuspend.S | 54 | ||||
-rw-r--r-- | lib/libc/i386/sys/syscall.S | 55 |
16 files changed, 961 insertions, 0 deletions
diff --git a/lib/libc/i386/sys/Ovfork.S b/lib/libc/i386/sys/Ovfork.S new file mode 100644 index 000000000000..181dae564286 --- /dev/null +++ b/lib/libc/i386/sys/Ovfork.S @@ -0,0 +1,80 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: Ovfork.S,v 1.3 1994/02/21 05:19:08 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)Ovfork.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +/* + * pid = vfork(); + * + * %edx == 0 in parent process, %edx == 1 in child process. + * %eax == pid of child in parent, %eax == pid of parent in child. + * + */ + .set vfork,66 +.globl _vfork +.type _vfork,@function + +_vfork: + popl %ecx /* my rta into ecx */ + movl $vfork, %eax + LCALL(7,0) + jb verror +vforkok: + cmpl $0,%edx /* child process? */ + jne child /* yes */ + jmp parent +.globl _errno +verror: +#ifdef PIC + PIC_PROLOGUE + movl PIC_GOT(_errno), %edx + movl %eax,(%edx) + PIC_EPILOGUE +#else + movl %eax,_errno +#endif + movl $-1,%eax + jmp %ecx +child: + movl $0,%eax +parent: + jmp %ecx diff --git a/lib/libc/i386/sys/brk.S b/lib/libc/i386/sys/brk.S new file mode 100644 index 000000000000..e884ac267514 --- /dev/null +++ b/lib/libc/i386/sys/brk.S @@ -0,0 +1,91 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: brk.S,v 1.3 1994/02/21 05:13:26 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)brk.s 5.2 (Berkeley) 12/17/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +#define SYS_brk 17 + + .globl curbrk + .globl minbrk +ENTRY(_brk) + jmp ok + +ENTRY(brk) +#ifdef PIC + movl 4(%esp),%eax + PIC_PROLOGUE + movl PIC_GOT(curbrk),%edx # set up GOT addressing + movl PIC_GOT(minbrk),%ecx # + cmpl %eax,(%ecx) + PIC_EPILOGUE + jl ok + movl (%ecx),%eax + movl %eax,4(%esp) +ok: + lea SYS_brk,%eax + LCALL(7,0) + jb err + movl 4(%esp),%eax + movl %eax,(%edx) + movl $0,%eax + ret +err: + jmp PIC_PLT(cerror) + +#else + + movl 4(%esp),%eax + cmpl %eax,minbrk + jl ok + movl minbrk,%eax + movl %eax,4(%esp) +ok: + lea SYS_brk,%eax + LCALL(7,0) + jb err + movl 4(%esp),%eax + movl %eax,curbrk + movl $0,%eax + ret +err: + jmp cerror +#endif diff --git a/lib/libc/i386/sys/cerror.S b/lib/libc/i386/sys/cerror.S new file mode 100644 index 000000000000..27fec0aecbb9 --- /dev/null +++ b/lib/libc/i386/sys/cerror.S @@ -0,0 +1,56 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: cerror.S,v 1.2 1994/02/21 05:19:09 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)cerror.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + + .globl _errno +cerror: +#ifdef PIC + PIC_PROLOGUE + movl PIC_GOT(_errno),%ecx + movl %eax,(%ecx) + PIC_EPILOGUE +#else + movl %eax,_errno +#endif + movl $-1,%eax + ret diff --git a/lib/libc/i386/sys/exect.S b/lib/libc/i386/sys/exect.S new file mode 100644 index 000000000000..1739760f887a --- /dev/null +++ b/lib/libc/i386/sys/exect.S @@ -0,0 +1,54 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: exect.S,v 1.2 1994/02/21 05:19:10 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)exect.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" +#include <machine/psl.h> + +ENTRY(exect) + lea SYS_execve,%eax + pushf + popl %edx + orl $ PSL_T,%edx + pushl %edx + popf + LCALL(7,0) + jmp cerror /* exect(file, argv, env); */ diff --git a/lib/libc/i386/sys/fork.S b/lib/libc/i386/sys/fork.S new file mode 100644 index 000000000000..15b7c46dfe96 --- /dev/null +++ b/lib/libc/i386/sys/fork.S @@ -0,0 +1,50 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: fork.S,v 1.2 1994/02/21 05:19:11 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)fork.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +SYSCALL(fork) + cmpl $0,%edx /* parent, since %edx == 0 in parent, 1 in child */ + je 1f + movl $0,%eax +1: + ret /* pid = fork(); */ diff --git a/lib/libc/i386/sys/mount.S b/lib/libc/i386/sys/mount.S new file mode 100644 index 000000000000..e0366db6b750 --- /dev/null +++ b/lib/libc/i386/sys/mount.S @@ -0,0 +1,47 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: mount.S,v 1.2 1994/02/21 05:19:12 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)mount.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +SYSCALL(mount) + movl $0,%eax + ret diff --git a/lib/libc/i386/sys/pipe.S b/lib/libc/i386/sys/pipe.S new file mode 100644 index 000000000000..2aeae5813958 --- /dev/null +++ b/lib/libc/i386/sys/pipe.S @@ -0,0 +1,50 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: pipe.S,v 1.2 1994/02/21 05:19:13 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)pipe.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +SYSCALL(pipe) + movl 4(%esp),%ecx + movl %eax,(%ecx) + movl %edx,4(%ecx) + movl $0,%eax + ret diff --git a/lib/libc/i386/sys/ptrace.S b/lib/libc/i386/sys/ptrace.S new file mode 100644 index 000000000000..6137098fcdf5 --- /dev/null +++ b/lib/libc/i386/sys/ptrace.S @@ -0,0 +1,60 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: ptrace.S,v 1.2 1994/02/21 05:19:14 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)ptrace.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +ENTRY(ptrace) + xorl %eax,%eax +#ifdef PIC + PIC_PROLOGUE + movl PIC_GOT(_errno),%edx + movl %eax,(%edx) + PIC_EPILOGUE +#else + movl %eax,_errno +#endif + lea SYS_ptrace,%eax + LCALL(7,0) + jb err + ret +err: + jmp cerror diff --git a/lib/libc/i386/sys/reboot.S b/lib/libc/i386/sys/reboot.S new file mode 100644 index 000000000000..47e2f0a4b15a --- /dev/null +++ b/lib/libc/i386/sys/reboot.S @@ -0,0 +1,46 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: reboot.S,v 1.2 1994/02/21 05:19:15 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)reboot.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +SYSCALL(reboot) + iret diff --git a/lib/libc/i386/sys/sbrk.S b/lib/libc/i386/sys/sbrk.S new file mode 100644 index 000000000000..fef35cb529c8 --- /dev/null +++ b/lib/libc/i386/sys/sbrk.S @@ -0,0 +1,89 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: sbrk.S,v 1.2 1994/02/21 05:19:16 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)sbrk.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +#define SYS_brk 17 + + .globl _end + .globl minbrk + .globl curbrk + + .data +minbrk: .long _end +curbrk: .long _end + .text + +ENTRY(sbrk) +#ifdef PIC + movl 4(%esp),%ecx + PIC_PROLOGUE + movl PIC_GOT(curbrk),%edx + movl (%edx),%eax + PIC_EPILOGUE + addl %eax,4(%esp) + lea SYS_brk,%eax + LCALL(7,0) + jb err + PIC_PROLOGUE + movl PIC_GOT(curbrk),%edx + movl (%edx),%eax + addl %ecx,(%edx) + PIC_EPILOGUE + ret +err: + jmp PIC_PLT(cerror) + +#else + + movl 4(%esp),%ecx + movl curbrk,%eax + addl %eax,4(%esp) + lea SYS_brk,%eax + LCALL(7,0) + jb err + movl curbrk,%eax + addl %ecx,curbrk + ret +err: + jmp cerror +#endif diff --git a/lib/libc/i386/sys/setlogin.S b/lib/libc/i386/sys/setlogin.S new file mode 100644 index 000000000000..92d761a53577 --- /dev/null +++ b/lib/libc/i386/sys/setlogin.S @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 1991 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: setlogin.S,v 1.2 1994/02/21 05:19:17 rgrimes Exp $ + */ + +#if defined(LIBC_SCCS) && !defined(lint) + .asciz "@(#)setlogin.s 5.2 (Berkeley) 4/12/91" +#endif /* LIBC_SCCS and not lint */ + +#include "SYS.h" + +.globl __logname_valid /* in getlogin() */ + +SYSCALL(setlogin) +#ifdef PIC + PIC_PROLOGUE + pushl %eax + movl PIC_GOT(__logname_valid),%eax + movl $0,(%eax) + popl %eax + PIC_EPILOGUE +#else + movl $0,__logname_valid +#endif + ret /* setlogin(name) */ diff --git a/lib/libc/i386/sys/sigpending.S b/lib/libc/i386/sys/sigpending.S new file mode 100644 index 000000000000..4318b6d9aabd --- /dev/null +++ b/lib/libc/i386/sys/sigpending.S @@ -0,0 +1,49 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: sigpending.S,v 1.2 1994/02/21 05:19:19 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)sigpending.s 5.1 (Berkeley) 7/1/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +SYSCALL(sigpending) + movl 4(%esp),%ecx # fetch pointer to... + movl %eax,(%ecx) # store old mask + xorl %eax,%eax + ret diff --git a/lib/libc/i386/sys/sigprocmask.S b/lib/libc/i386/sys/sigprocmask.S new file mode 100644 index 000000000000..ce929a03b081 --- /dev/null +++ b/lib/libc/i386/sys/sigprocmask.S @@ -0,0 +1,66 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: sigprocmask.S,v 1.2 1994/02/21 05:19:20 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)sigprocmask.s 5.2 (Berkeley) 12/17/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +err: + jmp cerror + +ENTRY(sigprocmask) + movl 8(%esp),%ecx # fetch new sigset pointer + cmpl $0,%ecx # check new sigset pointer + jne 1f # if not null, indirect +/* movl $0,8(%esp) # null mask pointer: block empty set */ + movl $1,4(%esp) # SIG_BLOCK + jmp 2f +1: movl (%ecx),%ecx # fetch indirect ... + movl %ecx,8(%esp) # to new mask arg +2: movl $ SYS_sigprocmask , %eax + LCALL(0x7,0) + jb err + movl 12(%esp),%ecx # fetch old mask requested + cmpl $0,%ecx # test if old mask requested + je out + movl %eax,(%ecx) # store old mask +out: + xorl %eax,%eax + ret diff --git a/lib/libc/i386/sys/sigreturn.S b/lib/libc/i386/sys/sigreturn.S new file mode 100644 index 000000000000..b98c9508e8d8 --- /dev/null +++ b/lib/libc/i386/sys/sigreturn.S @@ -0,0 +1,56 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: sigreturn.S,v 1.2 1994/02/21 05:19:21 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)sigreturn.s 5.2 (Berkeley) 12/17/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +/* + * We must preserve the state of the registers as the user has set them up. + */ +#ifdef PROF +#undef ENTRY +#define ENTRY(x) \ + .globl _/**/x; .align 2; _/**/x: pusha ; \ + .data; 1:; .long 0; .text; movl $1b,%eax; call mcount; popa ; nop +#endif /* PROF */ + +SYSCALL(sigreturn) + ret diff --git a/lib/libc/i386/sys/sigsuspend.S b/lib/libc/i386/sys/sigsuspend.S new file mode 100644 index 000000000000..1db4c1a3543c --- /dev/null +++ b/lib/libc/i386/sys/sigsuspend.S @@ -0,0 +1,54 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)sigsuspend.s 5.2 (Berkeley) 12/17/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +err: + jmp cerror + +ENTRY(sigsuspend) + movl 4(%esp),%eax # fetch mask arg + movl (%eax),%eax # indirect to mask arg + movl %eax,4(%esp) + movl $ SYS_sigsuspend ,%eax + LCALL(0x7,0) + jb err + xorl %eax,%eax # shouldn t happen + ret diff --git a/lib/libc/i386/sys/syscall.S b/lib/libc/i386/sys/syscall.S new file mode 100644 index 000000000000..37d180410e0c --- /dev/null +++ b/lib/libc/i386/sys/syscall.S @@ -0,0 +1,55 @@ +/*- + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id: syscall.S,v 1.2 1994/02/21 05:19:22 rgrimes Exp $ + */ + +#if defined(SYSLIBC_SCCS) && !defined(lint) + .asciz "@(#)syscall.s 5.1 (Berkeley) 4/23/90" +#endif /* SYSLIBC_SCCS and not lint */ + +#include "SYS.h" + +ENTRY(syscall) + pop %ecx /* rta */ + pop %eax /* syscall number */ + push %ecx + LCALL(7,0) + push %ecx /* need to push a word to keep stack frame intact + upon return; the word must be the return address. */ + jb 1f + ret +1: + jmp cerror |