summaryrefslogtreecommitdiff
path: root/lib/libc/arch/sparc/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 08:53:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 08:53:40 +0000
commitd6583bb2a13f329cf0332ef2570eb8bb8fc0e39c (patch)
treeece253b876159b39c620e62b6c9b1174642e070e /lib/libc/arch/sparc/sys
initial import of NetBSD tree
Diffstat (limited to 'lib/libc/arch/sparc/sys')
-rw-r--r--lib/libc/arch/sparc/sys/Ovfork.S57
-rw-r--r--lib/libc/arch/sparc/sys/brk.S89
-rw-r--r--lib/libc/arch/sparc/sys/cerror.S63
-rw-r--r--lib/libc/arch/sparc/sys/exect.S50
-rw-r--r--lib/libc/arch/sparc/sys/fork.S50
-rw-r--r--lib/libc/arch/sparc/sys/pipe.S57
-rw-r--r--lib/libc/arch/sparc/sys/ptrace.S63
-rw-r--r--lib/libc/arch/sparc/sys/reboot.S48
-rw-r--r--lib/libc/arch/sparc/sys/sbrk.S82
-rw-r--r--lib/libc/arch/sparc/sys/setlogin.S59
-rw-r--r--lib/libc/arch/sparc/sys/sigpending.S56
-rw-r--r--lib/libc/arch/sparc/sys/sigprocmask.S67
-rw-r--r--lib/libc/arch/sparc/sys/sigreturn.S50
-rw-r--r--lib/libc/arch/sparc/sys/sigsuspend.S51
-rw-r--r--lib/libc/arch/sparc/sys/syscall.S51
15 files changed, 893 insertions, 0 deletions
diff --git a/lib/libc/arch/sparc/sys/Ovfork.S b/lib/libc/arch/sparc/sys/Ovfork.S
new file mode 100644
index 00000000000..eaa9289fd19
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/Ovfork.S
@@ -0,0 +1,57 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: Ovfork.s,v 1.1 91/07/06 13:05:56 torek Exp
+ * $Id: Ovfork.S,v 1.1 1995/10/18 08:41:41 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)Ovfork.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_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"
+
+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
diff --git a/lib/libc/arch/sparc/sys/brk.S b/lib/libc/arch/sparc/sys/brk.S
new file mode 100644
index 00000000000..1436c459412
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/brk.S
@@ -0,0 +1,89 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: brk.s,v 1.3 92/06/25 12:56:05 mccanne Exp
+ * $Id: brk.S,v 1.1 1995/10/18 08:41:41 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)brk.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ .globl curbrk
+ .globl minbrk
+
+ .data
+minbrk: .long _end ! lower brk limit; also for gmon code
+ .text
+
+#ifdef PIC
+ENTRY(brk)
+ PIC_PROLOGUE(%o5,%o4)
+ ld [%o5 + minbrk], %o4
+ ld [%o4], %o1 ! %o1 = minbrk
+ cmp %o1, %o0 ! if (minbrk > %o0)
+ bg,a 0f
+ mov %o1, %o0 ! %o0 = minbrk
+0:
+ mov %o0, %o2 ! save argument to syscall
+ mov SYS_break, %g1
+ t ST_SYSCALL
+ bcc,a 1f
+ ld [%o5 + curbrk], %o4
+ ERROR()
+1:
+ retl ! success, return 0 & record new break
+ st %o2, [%o4]
+#else
+ENTRY(brk)
+ sethi %hi(minbrk), %o1 ! %o1 = minbrk
+ ld [%o1 + %lo(minbrk)], %o1
+ cmp %o1, %o0 ! if (minbrk > %o0)
+ bg,a 0f
+ mov %o1, %o0 ! %o0 = minbrk
+0:
+ mov %o0, %o2 ! save argument to syscall
+ mov SYS_break, %g1
+ t ST_SYSCALL
+ bcc,a 1f
+ sethi %hi(curbrk), %g1
+ ERROR()
+1:
+ retl ! success, return 0 & record new break
+ st %o2, [%g1 + %lo(curbrk)]
+#endif
diff --git a/lib/libc/arch/sparc/sys/cerror.S b/lib/libc/arch/sparc/sys/cerror.S
new file mode 100644
index 00000000000..d11d0995502
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/cerror.S
@@ -0,0 +1,63 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: cerror.s,v 1.3 92/07/02 04:17:59 torek Exp
+ * $Id: cerror.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)cerror.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "DEFS.h"
+#include "SYS.h"
+
+ .globl _errno
+#ifdef PIC
+FUNC(cerror)
+ ld [%g1 + _errno], %g1
+ st %o0, [%g1]
+ mov -1, %o0
+ retl
+ mov -1, %o1
+#else
+FUNC(cerror)
+ sethi %hi(_errno), %g1
+ st %o0, [%g1 + %lo(_errno)]
+ mov -1, %o0
+ retl
+ mov -1, %o1
+#endif
diff --git a/lib/libc/arch/sparc/sys/exect.S b/lib/libc/arch/sparc/sys/exect.S
new file mode 100644
index 00000000000..474fc70c654
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/exect.S
@@ -0,0 +1,50 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: exect.s,v 1.1 91/07/06 13:05:57 torek Exp
+ * $Id: exect.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)exect.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ENTRY(exect)
+ mov SYS_execve, %g1 /* execve(file, argv, env) */
+ t ST_SYSCALL
+ ERROR()
diff --git a/lib/libc/arch/sparc/sys/fork.S b/lib/libc/arch/sparc/sys/fork.S
new file mode 100644
index 00000000000..b6f9edb349a
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/fork.S
@@ -0,0 +1,50 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: fork.s,v 1.1 91/07/06 13:05:58 torek Exp
+ * $Id: fork.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)fork.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+SYSCALL(fork)
+ 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
diff --git a/lib/libc/arch/sparc/sys/pipe.S b/lib/libc/arch/sparc/sys/pipe.S
new file mode 100644
index 00000000000..b85bfd5075e
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/pipe.S
@@ -0,0 +1,57 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: pipe.s,v 1.1 91/07/06 13:05:58 torek Exp
+ * $Id: pipe.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)pipe.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ENTRY(pipe)
+ mov %o0, %o2 ! save pointer
+ mov SYS_pipe, %g1
+ t ST_SYSCALL ! pipe()
+ bcc,a 1f
+ st %o0, [%o2] ! success, store fds
+ ERROR()
+1:
+ st %o1, [%o2 + 4]
+ retl ! and return 0
+ clr %o0
diff --git a/lib/libc/arch/sparc/sys/ptrace.S b/lib/libc/arch/sparc/sys/ptrace.S
new file mode 100644
index 00000000000..afd37f1ba15
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/ptrace.S
@@ -0,0 +1,63 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: ptrace.s,v 1.2 91/12/20 01:59:00 leres Exp
+ * $Id: ptrace.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)ptrace.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ENTRY(ptrace)
+#ifdef PIC
+ PIC_PROLOGUE(%g1,%g2)
+ ld [%g1 +_errno], %g1
+ st %g0, [%g1]
+#else
+ sethi %hi(_errno), %g1
+ st %g0, [%g1 + %lo(_errno)]
+#endif
+ mov SYS_ptrace, %g1
+ t ST_SYSCALL
+ bcc 1f
+ nop
+ ERROR()
+1:
+ retl
+ nop
diff --git a/lib/libc/arch/sparc/sys/reboot.S b/lib/libc/arch/sparc/sys/reboot.S
new file mode 100644
index 00000000000..69f67a7d9df
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/reboot.S
@@ -0,0 +1,48 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: reboot.s,v 1.1 91/07/06 13:05:59 torek Exp
+ * $Id: reboot.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)reboot.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+SYSCALL(reboot)
+ unimp 0
diff --git a/lib/libc/arch/sparc/sys/sbrk.S b/lib/libc/arch/sparc/sys/sbrk.S
new file mode 100644
index 00000000000..7a7de1523c2
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/sbrk.S
@@ -0,0 +1,82 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: sbrk.s,v 1.3 92/07/02 00:56:49 torek Exp
+ * $Id: sbrk.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)sbrk.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ .globl _end
+ .globl curbrk
+
+ .data
+curbrk: .long _end
+ .text
+
+ENTRY(sbrk)
+#ifdef PIC
+ PIC_PROLOGUE(%o5,%o4)
+ ld [%o5 + curbrk], %o2
+ ld [%o2], %o3 ! %o3 = old break
+ add %o3, %o0, %o4 ! %o4 = new break
+ mov %o4, %o0 ! copy for syscall
+ mov SYS_break, %g1
+ t ST_SYSCALL ! break(new_break)
+ bcc,a 1f ! if success,
+ mov %o3, %o0 ! set return value
+ ERROR()
+1:
+ retl ! and update curbrk
+ st %o4, [%o2]
+#else
+ sethi %hi(curbrk), %o2
+ ld [%o2 + %lo(curbrk)], %o3 ! %o3 = old break
+ add %o3, %o0, %o4 ! %o4 = new break
+ mov %o4, %o0 ! copy for syscall
+ mov SYS_break, %g1
+ t ST_SYSCALL ! break(new_break)
+ bcc,a 1f ! if success,
+ mov %o3, %o0 ! set return value
+ ERROR()
+1:
+ retl ! and update curbrk
+ st %o4, [%o2 + %lo(curbrk)]
+#endif
diff --git a/lib/libc/arch/sparc/sys/setlogin.S b/lib/libc/arch/sparc/sys/setlogin.S
new file mode 100644
index 00000000000..a8ac00b13a4
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/setlogin.S
@@ -0,0 +1,59 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: setlogin.s,v 1.1 91/07/06 13:06:00 torek Exp
+ * $Id: setlogin.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)setlogin.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ .globl ___logname_valid /* in getlogin() */
+
+SYSCALL(setlogin)
+#ifdef PIC
+ PIC_PROLOGUE(%g1,%g2)
+ ld [%g1 + ___logname_valid], %g1
+ retl
+ st %g0, [%g1]
+#else
+ sethi %hi(___logname_valid), %g1
+ retl
+ st %g0, [%g1 + %lo(___logname_valid)]
+#endif
diff --git a/lib/libc/arch/sparc/sys/sigpending.S b/lib/libc/arch/sparc/sys/sigpending.S
new file mode 100644
index 00000000000..4092cea2e20
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/sigpending.S
@@ -0,0 +1,56 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: sigpending.s,v 1.1 91/07/06 13:06:00 torek Exp
+ * $Id: sigpending.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)sigpending.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ENTRY(sigpending)
+ mov %o0, %o2 ! save pointer
+ mov SYS_sigpending, %g1
+ t ST_SYSCALL ! sigpending()
+ bcc,a 1f ! if success,
+ st %o0, [%o2] ! store return value
+ ERROR()
+1:
+ retl ! and return 0
+ clr %o0
diff --git a/lib/libc/arch/sparc/sys/sigprocmask.S b/lib/libc/arch/sparc/sys/sigprocmask.S
new file mode 100644
index 00000000000..69d452731cd
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/sigprocmask.S
@@ -0,0 +1,67 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: sigprocmask.s,v 1.1 91/07/06 13:06:01 torek Exp
+ * $Id: sigprocmask.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)sigprocmask.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+/*
+ * 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_sigprocmask, %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
diff --git a/lib/libc/arch/sparc/sys/sigreturn.S b/lib/libc/arch/sparc/sys/sigreturn.S
new file mode 100644
index 00000000000..e194f3004ef
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/sigreturn.S
@@ -0,0 +1,50 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: sigreturn.s,v 1.1 91/07/06 13:06:01 torek Exp
+ * $Id: sigreturn.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)sigreturn.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ENTRY(sigreturn)
+ mov SYS_sigreturn, %g1
+ t ST_SYSCALL
+ ERROR()
diff --git a/lib/libc/arch/sparc/sys/sigsuspend.S b/lib/libc/arch/sparc/sys/sigsuspend.S
new file mode 100644
index 00000000000..f4fa616aca9
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/sigsuspend.S
@@ -0,0 +1,51 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: sigsuspend.s,v 1.1 91/07/06 13:06:01 torek Exp
+ * $Id: sigsuspend.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)sigsuspend.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ENTRY(sigsuspend)
+ ld [%o0], %o0 ! indirect to mask argument
+ mov SYS_sigsuspend, %g1
+ t ST_SYSCALL
+ ERROR() ! always terminates with EINTR
diff --git a/lib/libc/arch/sparc/sys/syscall.S b/lib/libc/arch/sparc/sys/syscall.S
new file mode 100644
index 00000000000..b009e30946d
--- /dev/null
+++ b/lib/libc/arch/sparc/sys/syscall.S
@@ -0,0 +1,51 @@
+/*
+ * 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. 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.
+ *
+ * from: Header: syscall.s,v 1.1 91/07/06 13:06:02 torek Exp
+ * $Id: syscall.S,v 1.1 1995/10/18 08:41:42 deraadt Exp $
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)syscall.s 8.1 (Berkeley) 6/4/93"
+#endif /* LIBC_SCCS and not lint */
+
+#include "SYS.h"
+
+ENTRY(syscall)
+ mov 0|SYSCALL_G2RFLAG, %g1 ! 0 == indir
+ add %o7, 8, %g2
+ t ST_SYSCALL
+ ERROR()