1 $NetBSD: patch-ay,v 1.1 1998/10/28 18:18:09 bad Exp $
3 --- /dev/null Sun Oct 25 03:15:17 1998
4 +++ machdep/syscall-arm32-netbsd-1.3.S Sun Oct 25 18:49:24 1998
6 +/* ==== syscall.S ============================================================
7 + * Copyright (c) 1990 The Regents of the University of California.
8 + * Copyright (c) 1993 Chris Provenzano, proven@mit.edu
9 + * All rights reserved.
11 + * This code is derived from software contributed to Berkeley by
14 + * Redistribution and use in source and binary forms, with or without
15 + * modification, are permitted provided that the following conditions
17 + * 1. Redistributions of source code must retain the above copyright
18 + * notice, this list of conditions and the following disclaimer.
19 + * 2. Redistributions in binary form must reproduce the above copyright
20 + * notice, this list of conditions and the following disclaimer in the
21 + * documentation and/or other materials provided with the distribution.
22 + * 3. All advertising materials mentioning features or use of this software
23 + * must display the following acknowledgement:
24 + * This product includes software developed by the University of
25 + * California, Berkeley and its contributors.
26 + * 4. Neither the name of the University nor the names of its contributors
27 + * may be used to endorse or promote products derived from this software
28 + * without specific prior written permission.
30 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
31 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
34 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
39 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
42 + * Description : Machine dependent syscalls for i386/i486/i586
44 + * 1.00 93/08/26 proven
45 + * -Started coding this file.
47 + * 1.01 93/11/13 proven
48 + * -The functions readv() and writev() added.
53 + .asciz "$Id: patch-bc,v 1.1 1998/12/28 22:22:03 bad Exp $";
56 +#if defined(SYSLIBC_SCCS) && !defined(lint)
57 + .asciz "@(#)syscall.s 5.1 (Berkeley) 4/23/90"
58 +#endif /* SYSLIBC_SCCS and not lint */
60 +#include <machine/asm.h>
61 +#include <sys/syscall.h>
64 + * Initial asm stuff for all functions.
70 +/* ==========================================================================
71 + * machdep_sys_fork()
73 + .globl _machdep_sys_fork;
79 + sub r1, r1, #0x00000001
85 +/* ==========================================================================
86 + * machdep_sys_fstat()
88 + .globl _machdep_sys_fstat;
96 +/* ==========================================================================
97 + * machdep_sys___syscall()
100 +_machdep_sys___syscall:;
107 +#ifndef SYS___sigsuspend14
108 +/* ==========================================================================
109 + * machdep_sys_sigsuspend()
111 + .globl _machdep_sys_sigsuspend;
113 +_machdep_sys_sigsuspend:;
118 + mov r0, #0x00000000
123 +#ifndef SYS___sigprocmask14
124 +/* ==========================================================================
125 + * machdep_sys_sigprocmask()
127 + .globl _machdep_sys_sigprocmask;
129 +_machdep_sys_sigprocmask:;
131 + teq r1, #0x00000000
132 + moveq r0, #0x00000001
133 + moveq r1, #0x00000000
135 + swi SYS_sigprocmask
137 + teq r2, #0x00000000
139 + mov r0, #0x00000000
143 +/* ==========================================================================
144 + * machdep_sys_ftruncate()
146 + .global _machdep_sys_ftruncate
147 +_machdep_sys_ftruncate:
149 + stmfd r13!, {r11, r12, r14, r15}
157 + bl _machdep_sys___syscall
158 + ldmea r11, {r11, r13, r15}
160 +/* ==========================================================================
161 + * machdep_sys_lseek()
163 + .global _machdep_sys_lseek
167 + stmfd r13!, {r11, r12, r14, r15}
168 + str r3, [r13, #-4]!
176 + bl _machdep_sys___syscall
177 + ldmea r11, {r11, r13, r15}
179 +/* ==========================================================================
180 + * machdep_sys_pipe()
182 + .globl _machdep_sys_pipe;
189 + str r0, [r2, #0x0000]
190 + str r1, [r2, #0x0004]
191 + mov r0, #0x00000000
196 + rsb r0, r0, #0x00000000
197 + mvn r1, #0x00000000