mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
initial import
This commit is contained in:
47
sysdeps/unix/bsd/vax/brk.S
Normal file
47
sysdeps/unix/bsd/vax/brk.S
Normal file
@ -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)
|
28
sysdeps/unix/bsd/vax/pipe.S
Normal file
28
sysdeps/unix/bsd/vax/pipe.S
Normal file
@ -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)
|
35
sysdeps/unix/bsd/vax/sysdep.S
Normal file
35
sysdeps/unix/bsd/vax/sysdep.S
Normal file
@ -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
|
55
sysdeps/unix/bsd/vax/sysdep.h
Normal file
55
sysdeps/unix/bsd/vax/sysdep.h
Normal file
@ -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 */
|
27
sysdeps/unix/bsd/vax/wait.S
Normal file
27
sysdeps/unix/bsd/vax/wait.S
Normal file
@ -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)
|
37
sysdeps/unix/bsd/vax/wait3.S
Normal file
37
sysdeps/unix/bsd/vax/wait3.S
Normal file
@ -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)
|
Reference in New Issue
Block a user