Update of /cvsroot/linux-vax/glibc/sysdeps/unix/sysv/linux/vax
In directory sc8-pr-cvs1:/tmp/cvs-serv13329
Added Files:
syscall.S
Log Message:
VAX implementation of syscall(2)
--- NEW FILE: syscall.S ---
/* Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <da...@az...>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <sysdep.h>
/* This implements syscall(2). The first argument is the syscall
number, the remaining args should be passed to the syscall */
ENTRY(syscall)
.word 0x0 /* no registers to preserve */
/* syscall number to R0 */
movl 4(%ap), %r0
/* replace syscall number with argcount-1 */
subl3 $1, (%ap), 4(%ap)
/* Points AP to the modified arg list, with the
first argument removed.*/
moval 4(%ap), %ap
chmk %r0
cmpl $-4095, %r0
bgtru no_error
jmp SYSCALL_ERROR_LABEL
no_error:
ret
END(syscall)
|