diff options
author | Roland McGrath <roland@gnu.org> | 1995-02-18 01:27:10 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1995-02-18 01:27:10 +0000 |
commit | 28f540f45bbacd939bfd07f213bcad2bf730b1bf (patch) | |
tree | 15f07c4c43d635959c6afee96bde71fb1b3614ee /sysdeps/unix/bsd/vax | |
download | glibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.tar glibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.tar.gz glibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.tar.bz2 glibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.zip |
initial import
Diffstat (limited to 'sysdeps/unix/bsd/vax')
-rw-r--r-- | sysdeps/unix/bsd/vax/brk.S | 47 | ||||
-rw-r--r-- | sysdeps/unix/bsd/vax/pipe.S | 28 | ||||
-rw-r--r-- | sysdeps/unix/bsd/vax/sysdep.S | 35 | ||||
-rw-r--r-- | sysdeps/unix/bsd/vax/sysdep.h | 55 | ||||
-rw-r--r-- | sysdeps/unix/bsd/vax/wait.S | 27 | ||||
-rw-r--r-- | sysdeps/unix/bsd/vax/wait3.S | 37 |
6 files changed, 229 insertions, 0 deletions
diff --git a/sysdeps/unix/bsd/vax/brk.S b/sysdeps/unix/bsd/vax/brk.S new file mode 100644 index 0000000000..b3e8e10307 --- /dev/null +++ b/sysdeps/unix/bsd/vax/brk.S @@ -0,0 +1,47 @@ +/* Copyright (C) 1991, 1995 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +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., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +#ifndef SYS_brk +#define SYS_brk 17 +#endif + +#ifndef HAVE_GNU_LD +#define __end _end +#endif + +.data +.globl ___curbrk +___curbrk: + .long __end + +.text +ENTRY (__brk) + cmpl 4(ap), __end + bgeq 0f + movl __env, 4(ap) +0: chmk $SYS_brk + bcs 1f + movl 4(ap), ___curbrk + clrl r0 + ret +1: + jmp syscall_error + +weak_alias (__brk, brk) diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S new file mode 100644 index 0000000000..10c681aac6 --- /dev/null +++ b/sysdeps/unix/bsd/vax/pipe.S @@ -0,0 +1,28 @@ +/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +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., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +SYSCALL__ (pipe, 1) + movl 4(ap), r2 + movl r0, (r2)+ + movl r1, (r2) + clrl r0 + ret + +weak_alias (__pipe, pipe) diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S new file mode 100644 index 0000000000..618d889742 --- /dev/null +++ b/sysdeps/unix/bsd/vax/sysdep.S @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +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., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#define _ERRNO_H +#include <errnos.h> + +.globl _errno +.globl syscall_error +syscall_error: +#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN + /* We translate the system's EWOULDBLOCK error into EAGAIN. + The GNU C library always defines EWOULDBLOCK==EAGAIN. + EWOULDBLOCK_sys is the original number. */ + cmpl r0, $EWOULDBLOCK_sys + bne 0f + movl $EAGAIN, r0 +#endif +0: movl r0, _errno + mnegl $1, r0 + ret diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h new file mode 100644 index 0000000000..aeddad99ae --- /dev/null +++ b/sysdeps/unix/bsd/vax/sysdep.h @@ -0,0 +1,55 @@ +/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +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., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include <sysdeps/unix/sysdep.h> + +#ifdef ASSEMBLER + +#ifdef __STDC__ +#define ENTRY(name) \ + .globl _##name; \ + .even; \ + _##name##: +#else +#define ENTRY(name) \ + .globl _/**/name; \ + .even; \ + _/**/name/**/: +#endif + +#ifdef __STDC__ +#define PSEUDO(name, syscall_name, args) \ + .even; \ + .globl syscall_error \ + error: jmp syscall_error; \ + ENTRY (name) \ + chmk $SYS_##syscall_name \ + bcs error +#else +#define PSEUDO(name, syscall_name, args) \ + .even; \ + .globl syscall_error \ + error: jmp syscall_error; \ + ENTRY (name) \ + chmk $SYS_/**/syscall_name \ + bcs error +#endif + +#define MOVE(x,y) movl x , y + +#endif /* ASSEMBLER */ diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S new file mode 100644 index 0000000000..77311b49bf --- /dev/null +++ b/sysdeps/unix/bsd/vax/wait.S @@ -0,0 +1,27 @@ +/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +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., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +SYSCALL__ (wait, 1) + movl 4(ap), r2 + beq 1f + movl r1, (r2) +1: ret + +weak_alias (__wait, wait) diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S new file mode 100644 index 0000000000..2d8dba8297 --- /dev/null +++ b/sysdeps/unix/bsd/vax/wait3.S @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +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., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include <sysdep.h> + +ENTRY(___wait3) + movel 8(ap), r1 + movel 12(ap), r0 + /* Set all condition codes to tell the kernel this is wait3. */ + bispsw $15 + chmk $SYS_wait + bcs error + + movl 4(ap), r2 + beq 1f + movl r1, (r2) +1: ret + +.globl syscall_error +error: jmp syscall_error + +weak_alias (__wait3, wait3) |