]> sourceware.org Git - glibc.git/commitdiff
entered into RCS
authorBrendan Kehoe <brendan@zen.org>
Thu, 23 Dec 1993 06:27:57 +0000 (06:27 +0000)
committerBrendan Kehoe <brendan@zen.org>
Thu, 23 Dec 1993 06:27:57 +0000 (06:27 +0000)
30 files changed:
sysdeps/alpha/DEFS.h
sysdeps/alpha/Dist
sysdeps/alpha/Makefile
sysdeps/alpha/__math.h
sysdeps/alpha/copysign.c
sysdeps/alpha/divrem.m4 [new file with mode: 0644]
sysdeps/alpha/fabs.c
sysdeps/alpha/macros.m4
sysdeps/alpha/memchr.c
sysdeps/alpha/remqu.S [new file with mode: 0644]
sysdeps/alpha/setjmp.S
sysdeps/alpha/strchr.c
sysdeps/alpha/strlen.c
sysdeps/unix/bsd/Attic/osf1/alpha/brk.S
sysdeps/unix/bsd/Attic/osf1/alpha/fork.S [new file with mode: 0644]
sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S [new file with mode: 0644]
sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S
sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S
sysdeps/unix/bsd/Attic/osf1/alpha/recv.S [new file with mode: 0644]
sysdeps/unix/bsd/Attic/osf1/alpha/send.S [new file with mode: 0644]
sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S
sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S
sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S [new file with mode: 0644]
sysdeps/unix/bsd/Attic/osf1/alpha/start.S
sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h
sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S [new file with mode: 0644]
sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h [new file with mode: 0644]
sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S [new file with mode: 0644]
sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S [new file with mode: 0644]
sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c2a4fc88aee3a048c662abb75635d7c133e4e148 100644 (file)
@@ -0,0 +1,27 @@
+#ifdef __STDC__
+#define FUNC__(name)           \
+       .align 3;               \
+        .globl __##name;       \
+        .ent __##name;         \
+        __##name:              \
+       lda sp, -16(sp);        \
+       .frame sp, 16, t9, 0;   \
+       .prologue 0
+#else
+#define FUNC__(name)           \
+       .align 3;               \
+        .globl __/**/name;     \
+        .ent __/**/name,0;     \
+        __/**/name:            \
+       lda sp, -16(sp);        \
+       .frame sp, 16, t9, 0;   \
+       .prologue 0
+#endif
+
+#ifdef __STDC__
+#define NAME__(name)   \
+       __##name
+#else
+#define NAME__(name)   \
+       __/**/name
+#endif
index ad6ea0313a451f0856b615c6f5411f48b543b20e..c4ea856629b68f02fa3587e368c6cc649c41ff46 100644 (file)
@@ -1 +1,4 @@
 setjmp_aux.c
+DEFS.h
+divrem.m4 macros.m4
+divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S
index 736414197ae6e4035ee456950ff92752f9859342..5490776da664b8dc531a4d99a0ab41bd290f0627 100644 (file)
@@ -1,3 +1,91 @@
+# Copyright (C) 1993 Free Software Foundation, Inc.
+# Contributed by Brendan Kehoe (brendan@zen.org).
+
+# 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.
+
 ifeq ($(subdir),setjmp)
 sysdep_routines := $(sysdep_routines) setjmp_aux
 endif
+
+ifeq ($(subdir),gnulib)
+routines = $(divrem) 
+endif  # gnulib
+
+# We distribute these files, even though they are generated,
+# so as to avoid the need for a functioning m4 to build the library.
+divrem := divl divlu divq divqu reml remlu remq remqu
+
++divrem-NAME-divl := divl
++divrem-NAME-divlu := divlu
++divrem-NAME-divq := divq
++divrem-NAME-divqu := divqu
++divrem-NAME-reml := reml
++divrem-NAME-remlu := remlu
++divrem-NAME-remq := remq
++divrem-NAME-remqu := remqu
++divrem-NAME = $(+divrem-NAME-$(basename $(notdir $@)))
+
++divrem-OP-divl := divl
++divrem-OP-divlu := divlu
++divrem-OP-divq := divq
++divrem-OP-divqu := divqu
++divrem-OP-reml := reml
++divrem-OP-remlu := remlu
++divrem-OP-remq := remq
++divrem-OP-remqu := remqu
++divrem-BASEOP-divl := div
++divrem-BASEOP-divlu := div
++divrem-BASEOP-divq := div
++divrem-BASEOP-divqu := div
++divrem-BASEOP-reml := rem
++divrem-BASEOP-remlu := rem
++divrem-BASEOP-remq := rem
++divrem-BASEOP-remqu := rem
++divrem-S-divl := true
++divrem-S-divlu := false
++divrem-S-divq := true
++divrem-S-divqu := false
++divrem-S-reml := true
++divrem-S-remlu := false
++divrem-S-remq := true
++divrem-S-remqu := false
++divrem-SIZE-divl := l
++divrem-SIZE-divlu := l
++divrem-SIZE-divq := q
++divrem-SIZE-divqu := q
++divrem-SIZE-reml := l
++divrem-SIZE-remlu := l
++divrem-SIZE-remq := q
++divrem-SIZE-remqu := q
++divrem-MODE-divl := l
++divrem-MODE-divlu := lu
++divrem-MODE-divq := q
++divrem-MODE-divqu := qu
++divrem-MODE-reml := l
++divrem-MODE-remlu := lu
++divrem-MODE-remq := q
++divrem-MODE-remqu := qu
+
+$(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir)/alpha/DEFS.h $(sysdep_dir)/alpha/macros.m4
+       (echo "define(OP,\`$(+divrem-NAME)')\
+              define(BASEOP,\`$(+divrem-BASEOP-$(+divrem-NAME))')\
+              define(MODE,\`$(+divrem-MODE-$(+divrem-NAME))')\
+              define(SIZE,\`$(+divrem-SIZE-$(+divrem-NAME))')\
+              define(SIGNED,\`$(+divrem-S-$(+divrem-NAME))')\
+              define(SYSDEP_DIR, \`$(sysdep_dir)/alpha')\
+              /* This file is generated from divrem.m4; DO NOT EDIT! */"; \
+        cat $<) | $(M4) > $@-tmp
+       mv $@-tmp $@
index 5461fca2ac9abf6fba69d3bddd950990d9c6b594..b06f716c50b0184453f7815b8bd0e5f23d35ba91 100644 (file)
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA.  */
 
 #if defined (__GNUC__) && !defined (__NO_MATH_INLINES)
 
-extern __inline double
+extern __inline __CONSTVALUE double
 __copysign (double __x, double __y)
 {
   __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x));
index d86521c7418723801305a626e905b14468b20192..2136f6bfb09474d10436e32b11add84afa4a4bb8 100644 (file)
@@ -16,12 +16,14 @@ 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 __NO_MATH_INLINES
+
 #include <math.h>
 
 /* Return X with its sign changed to Y's.  */
-double
-__copysign (double x, double y)
+__inline __CONSTVALUE double
+__copysign (double __x, double __y)
 {
-  asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x));
-  return x;
+  __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x));
+  return __x;
 }
diff --git a/sysdeps/alpha/divrem.m4 b/sysdeps/alpha/divrem.m4
new file mode 100644 (file)
index 0000000..ab86128
--- /dev/null
@@ -0,0 +1,48 @@
+/* For each N divided by D, we do:
+      result = (double) N / (double) D
+   Then, for each N mod D, we do:
+      result = N - (D * divMODE (N, D))
+
+   FIXME:
+   The q and qu versions won't deal with operands > 50 bits.  We also
+   don't check for divide by zero.  */
+
+#include "DEFS.h"
+#if 0
+/* We do not handle div by zero yet.  */
+#include <machine/pal.h>
+#endif
+#include <regdef.h>
+
+define(path, `SYSDEP_DIR/macros.m4')dnl
+include(path)
+
+FUNC__(OP)
+       ! First set up the dividend.
+       EXTEND(t10)
+       stq t10,0(sp)
+       ldt $f10,0(sp)
+       cvtqt $f10,$f10
+       ADJQU($f10)
+
+       ! Then set up the divisor.
+       EXTEND(t11)
+       stq t11,0(sp)
+       ldt $f1,0(sp)
+       cvtqt $f1,$f1
+       ADJQU($f1)
+
+       ! Do the division.
+       divt $f10,$f1,$f10
+       cvttqc $f10,$f10
+
+       ! Put the result in t12.
+       stt $f10,0(sp)
+       ldq t12,0(sp)
+       FULLEXTEND(t12)
+
+       DOREM
+
+       lda sp,16(sp)
+       ret zero,(t9),1
+       .end NAME__(OP)
index 936202704a3dce43bd0ee97321fe17fd2b26f138..321df0d1e12c59f12809831f1dcb08f5843e9253 100644 (file)
@@ -16,11 +16,13 @@ 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 __NO_MATH_INLINES
+
 #include <math.h>
 
-double
-fabs (double x)
+__inline double
+fabs (double __x)
 {
-  asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
-  return x;
+  __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x));
+  return __x;
 }
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..982e705d19af9dfdef2a9a781c90ecbb804f4721 100644 (file)
@@ -0,0 +1,34 @@
+dnl NOTE: The $1 below is the argument to EXTEND, not register $1.
+define(EXTEND,
+`ifelse(SIZE, `l',
+`ifelse(SIGNED, `true',
+`      sextl $1, $1
+',dnl
+`      zapnot $1, 0xf, $1
+')')')dnl
+
+dnl FULLEXTEND -- extend the register named in the first argument
+define(FULLEXTEND,
+`ifelse(SIZE, `l',
+`      sextl $1, $1
+')')dnl
+
+dnl This is used by divqu.
+define(ADJQU,
+`ifelse(MODE, `qu',
+`      ldit    $f26, 18446744073709551616.0
+       addt    $f26, $1, $f26
+       fcmovlt $1, $f26, $1
+')')dnl
+
+define(DOREM,
+`ifelse(BASEOP, `rem',
+`      ! Compute the remainder.
+ifelse(SIZE, `l',
+`      mull t11, t12, t11
+       subl t10, t11, t12
+',dnl Note mulq/subq were only really used in remq, but we will find out
+dnl   if assuming they apply to remqu as well is wrong or not.
+`      mulq t11, t12, t11
+       subq t10, t11, t12
+')')')dnl
index 048c9fa25055b202a4309d6053ef1e8ec761a7b2..c6f99bfd6fb5c19fac78a88a1c337d02295b3a55 100644 (file)
@@ -25,6 +25,7 @@ memchr (const void *s, int c, size_t n)
   const char *char_ptr;
   const unsigned long int *longword_ptr;
   unsigned long int charmask;
+  size_t x;
 
   c = (unsigned char) c;
 
@@ -35,18 +36,29 @@ memchr (const void *s, int c, size_t n)
     if (*char_ptr == c)
       return (void *) char_ptr;
 
+  if (n == (size_t)0)
+    return NULL;
+
+  x = n;
+
   longword_ptr = (unsigned long int *) char_ptr;
 
   /* Set up a longword, each of whose bytes is C.  */
   charmask = c | (c << 8);
   charmask |= charmask << 16;
   charmask |= charmask << 32;
+  charmask |= charmask << 64;
 
   for (;;)
     {
       const unsigned long int longword = *longword_ptr++;
       int ge, le;
 
+      if (x < 4)
+       x = (size_t) 0;
+      else
+       x -= 4;
+
       /* Set bits in GE if bytes in CHARMASK are >= bytes in LONGWORD.  */
       asm ("cmpbge %1, %2, %0" : "=r" (ge) : "r" (charmask), "r" (longword));
 
@@ -58,15 +70,18 @@ memchr (const void *s, int c, size_t n)
        {
          /* Which of the bytes was the C?  */
 
-         char *cp = (char *) (longword_ptr - 1);
+         unsigned char *cp = (unsigned char *) (longword_ptr - 1);
+         int i;
 
-         if (cp[0] == c)
-           return cp;
-         if (cp[1] == c)
-           return &cp[1];
-         if (cp[2] == c)
-           return &cp[2];
-         return &cp[3];
+         for (i = 0; i < 6; i++)
+           if (cp[i] == c)
+             return &cp[i];
+         return &cp[7];
        }
+
+      if (x == (size_t)0)
+       break;
     }
+
+  return NULL;
 }
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
new file mode 100644 (file)
index 0000000..4bdc3db
--- /dev/null
@@ -0,0 +1,60 @@
+      /* This file is generated from divrem.m4; DO NOT EDIT! */
+/* For each N divided by D, we do:
+      result = (double) N / (double) D
+   Then, for each N mod D, we do:
+      result = N - (D * divMODE (N, D))
+
+   FIXME:
+   The q and qu versions won't deal with operands > 50 bits.  We also
+   don't check for divide by zero.  */
+
+#include "DEFS.h"
+#if 0
+/* We do not handle div by zero yet.  */
+#include <machine/pal.h>
+#endif
+#include <regdef.h>
+
+
+
+
+
+
+FUNC__(remqu)
+       ! First set up the dividend.
+       
+       stq t10,0(sp)
+       ldt $f10,0(sp)
+       cvtqt $f10,$f10
+               ldit    $f26, 18446744073709551616.0
+       addt    $f26, $f10, $f26
+       fcmovlt $f10, $f26, $f10
+
+
+       ! Then set up the divisor.
+       
+       stq t11,0(sp)
+       ldt $f1,0(sp)
+       cvtqt $f1,$f1
+               ldit    $f26, 18446744073709551616.0
+       addt    $f26, $f1, $f26
+       fcmovlt $f1, $f26, $f1
+
+
+       ! Do the division.
+       divt $f10,$f1,$f10
+       cvttqc $f10,$f10
+
+       ! Put the result in t12.
+       stt $f10,0(sp)
+       ldq t12,0(sp)
+       
+
+               ! Compute the remainder.
+       mulq t11, t12, t11
+       subq t10, t11, t12
+
+
+       lda sp,16(sp)
+       ret zero,(t9),1
+       .end NAME__(remqu)
index a5de80cd387446202a70d8560d36e7c7bbc83966..3880d0ffdf1b9ee74980469049c12f28c31ca291 100644 (file)
@@ -26,3 +26,4 @@ ENTRY (__setjmp)
        bis $15, $15, $17       /* Pass FP as 2nd arg.  */
        bis $30, $30, $18       /* Pass SP as 3nd arg.  */
        jmp $31, ($27), __setjmp_aux /* Call __setjmp_aux.  */
+       .end __setjmp
index db279ded8b876e8836026b6d73e2111365a5733c..fc56d518cc6b4576e1ff53bf4766ff8117ccc0eb 100644 (file)
@@ -32,10 +32,10 @@ strchr (const char *str, int c)
   /* Handle the first few characters by reading one character at a time.
      Do this until STR is aligned on a 8-byte border.  */
   for (char_ptr = str; ((unsigned long int) char_ptr & 7) != 0; ++char_ptr)
-    if (*char_ptr == '\0')
-      return NULL;
-    else if (*char_ptr == c)
+    if (*char_ptr == c)
       return (char *) char_ptr;
+    else if (*char_ptr == '\0')
+      return NULL;
 
   longword_ptr = (unsigned long int *) char_ptr;
 
@@ -43,6 +43,7 @@ strchr (const char *str, int c)
   charmask = c | (c << 8);
   charmask |= charmask << 16;
   charmask |= charmask << 32;
+  charmask |= charmask << 64;
 
   for (;;)
     {
@@ -64,21 +65,15 @@ strchr (const char *str, int c)
          /* Which of the bytes was the C?  */
 
          char *cp = (char *) (longword_ptr - 1);
-
-         if (cp[0] == c)
-           return cp;
-         if (cp[0] == 0)
-           return NULL;
-         if (cp[1] == c)
-           return &cp[1];
-         if (cp[1] == 0)
-           return NULL;
-         if (cp[2] == c)
-           return &cp[2];
-         if (cp[2] == 0)
-           return NULL;
-         if (cp[3] == c)
-           return &cp[3];
+         int i;
+
+         for (i = 0; i < 8; i++)
+           {
+             if (cp[i] == c)
+               return &cp[i];
+             if (cp[i] == 0)
+               return NULL;
+           }
          return NULL;
        }
     }
index 3fd1b252a0e0be6090bcf0efcfc875967ccf301c..d7744476ad60e0e818a23faad58d4edb40c8c3b1 100644 (file)
@@ -43,14 +43,12 @@ strlen (const char *str)
          /* Which of the bytes was the zero?  */
 
          const char *cp = (const char *) (longword_ptr - 1);
+         int i;
 
-         if (cp[0] == 0)
-           return cp - str;
-         if (cp[1] == 0)
-           return cp - str + 1;
-         if (cp[2] == 0)
-           return cp - str + 2;
-         return cp - str + 3;
+         for (i = 0; i < 6; i++)
+           if (cp[i] == 0)
+             return cp - str + i;
+         return cp - str + 7;
        }
     }
 }
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1475108d64decb1243b1f44bb437927c92e9c7e0 100644 (file)
@@ -0,0 +1,51 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+   Contributed by Brendan Kehoe (brendan@zen.org).
+
+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
+       .extern __end,8
+       .globl __curbrk
+__curbrk:
+       .quad __end
+
+.text
+ENTRY(__brk)
+       ! FIXME We do not check for asking for less than a page yet.
+       ldiq v0, SYS_brk
+       call_pal PAL_callsys
+       bne a3, error
+
+       /* Update __curbrk and exit cleanly.  */
+!      ldgp gp, 0(t12)
+       stl a0, __curbrk
+
+       mov zero, v0
+       ret
+       /* What a horrible way to die.  */
+error: ldgp gp,0(gp)
+       jmp zero,syscall_error
+       .end __brk
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S b/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S
new file mode 100644 (file)
index 0000000..8afcfbc
--- /dev/null
@@ -0,0 +1,23 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+   Contributed by Brendan Kehoe (brendan@zen.org).
+
+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__ (fork, 0)
+       cmovne a4, 0, v0
+       ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S b/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S
new file mode 100644 (file)
index 0000000..52f7cdb
--- /dev/null
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+   Contributed by Brendan Kehoe (brendan@zen.org).
+
+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__ (getdirentries, 4)
+       ret
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f0b82b3d1a160a8676e33dacab7e3e1eb44b71bc 100644 (file)
@@ -0,0 +1,25 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+   Contributed by Brendan Kehoe (brendan@zen.org).
+
+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>
+
+#include <sys/ult_syscall.h>
+#define SYS_killpg SYS_ult_killpg
+
+SYSCALL (killpg, 2)
+       ret
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6973e9603179c86bec13c36ccfe1d16b056468dd 100644 (file)
@@ -0,0 +1,28 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+   Contributed by Brendan Kehoe (brendan@zen.org).
+
+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)
+       /* Plop in the two descriptors.  */
+       stl r0, 0(a0)
+       stl r1, 4(a0)
+
+       /* Go out with a clean status.  */
+       mov zero, r0
+       ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S b/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S
new file mode 100644 (file)
index 0000000..4ac00eb
--- /dev/null
@@ -0,0 +1,25 @@
+/* Copyright (C) 1991, 1992 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>
+
+#include <sys/ult_syscall.h>
+#define SYS_recv SYS_ult_recv
+
+SYSCALL (recv, 4)
+       ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/send.S b/sysdeps/unix/bsd/Attic/osf1/alpha/send.S
new file mode 100644 (file)
index 0000000..ca46894
--- /dev/null
@@ -0,0 +1,25 @@
+/* Copyright (C) 1991, 1992 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>
+
+#include <sys/ult_syscall.h>
+#define SYS_send SYS_ult_send
+
+SYSCALL (send, 4)
+       ret
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..893ee089ebbe528ff40256e9d825d1bbf1119039 100644 (file)
@@ -0,0 +1,25 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+   Contributed by Brendan Kehoe (brendan@zen.org).
+
+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>
+
+#include <sys/ult_syscall.h>
+#define SYS_sigpause SYS_ult_sigpause
+
+SYSCALL__ (sigpause, 1)
+       ret
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f2536d7aff87182b51a2cdcf4fb21c418e411b6c 100644 (file)
@@ -0,0 +1,25 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+   Contributed by Brendan Kehoe (brendan@zen.org).
+
+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>
+
+#include <sys/ult_syscall.h>
+#define SYS_sigsetmask SYS_ult_sigsetmask
+
+SYSCALL__ (sigsetmask, 1)
+       ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S
new file mode 100644 (file)
index 0000000..d0d3ae0
--- /dev/null
@@ -0,0 +1,25 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+   Contributed by Brendan Kehoe (brendan@zen.org).
+
+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>
+
+#include <sys/ult_syscall.h>
+#define SYS_sigvec SYS_ult_sigvec
+
+SYSCALL__ (sigvec, 3)
+       ret
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d88b47e8e761ac586d250a41d850f041e5a37049 100644 (file)
@@ -0,0 +1,70 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+   Contributed by Brendan Kehoe (brendan@zen.org).
+
+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 HAVE_GNU_LD
+#define __environ environ
+#endif
+
+.comm __environ,       8
+.comm errno,           4
+
+!.sdata
+!.globl STARTFRM
+!STARTFRM = 0
+
+.text
+ENTRY(__start)
+       lda     sp, -16(sp)
+       stq     zero, 8(sp)
+
+       ! This branch puts the address of the current insn in t0.
+       br      t0, 10f
+10:
+       ! We set the GP register by using the address of the ldgp
+       ! (what we just put into t0).
+       ldgp    gp, 0(t0)
+
+       ! get argc
+       ldl     a0, 16(sp)
+
+       ! get argv
+       lda     a1, 24(sp)
+
+       ! move ahead to envp
+       s8addq  a0, a1, a2
+       addq    a2, 0x8, a2
+
+       ! Store in environ.
+       stq     a2, environ
+
+       ! Clear out errno.
+!      ldgp    gp, 0(t12)
+       stl     zero, errno
+
+       ! Call main.
+       jsr     ra, main
+       ldgp    gp, 0(ra)
+
+       mov     v0, a0
+
+       jsr     ra, exit
+       ldgp    gp, 0(ra)
+
+       .end __start
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9cadfaefd3e743844768482092a1a21cec7e5b3e 100644 (file)
@@ -0,0 +1,75 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+   Contributed by Brendan Kehoe (brendan@zen.org).
+
+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.  */
+
+#ifndef        _STATBUF_H
+#define        _STATBUF_H
+
+#include <gnu/types.h>
+
+/* Structure describing file characteristics.  */
+struct stat
+  {
+    int st_dev;                        /* Device.  */
+    unsigned int st_ino;       /* File serial number.          */
+    unsigned int st_mode;      /* File mode.  */
+    unsigned short st_nlink;   /* Link count.  */
+    unsigned int st_uid;       /* User ID of the file's owner. */
+    unsigned int st_gid;       /* Group ID of the file's group.*/
+    int st_rdev;               /* Device number, if device.  */
+
+    long st_size;              /* Size of file, in bytes.  */
+
+    int st_atime;              /* Time of last access.  */
+    int st_atime_usec;
+    int st_mtime;              /* Time of last modification.  */
+    int st_mtime_usec;
+    int st_ctime;              /* Time of last status change.  */
+    int st_ctime_usec;
+
+    unsigned int st_blksize;   /* Optimal block size for I/O.  */
+#define        _STATBUF_ST_BLKSIZE     /* Tell code we have this member.  */
+
+    int st_blocks;             /* Number of 512-byte blocks allocated.  */
+    unsigned int st_flags;
+    unsigned int st_gen;
+  };
+
+/* Encoding of the file mode.  */
+
+#define        __S_IFMT        0170000 /* These bits determine file type.  */
+
+/* File types.  */
+#define        __S_IFDIR       0040000 /* Directory.  */
+#define        __S_IFCHR       0020000 /* Character device.  */
+#define        __S_IFBLK       0060000 /* Block device.  */
+#define        __S_IFREG       0100000 /* Regular file.  */
+#define        __S_IFIFO       0010000 /* FIFO.  */
+
+#define        __S_IFLNK       0120000 /* Symbolic link.  */
+#define        __S_IFSOCK      0140000 /* Socket.  */
+
+/* Protection bits.  */
+
+#define        __S_ISUID       04000   /* Set user ID on execution.  */
+#define        __S_ISGID       02000   /* Set group ID on execution.  */
+#define        __S_ISVTX       01000   /* Save swapped text after use (sticky).  */
+#define        __S_IREAD       0400    /* Read by owner.  */
+#define        __S_IWRITE      0200    /* Write by owner.  */
+#define        __S_IEXEC       0100    /* Execute by owner.  */
+
+#endif /* statbuf.h */
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S
new file mode 100644 (file)
index 0000000..bc4865c
--- /dev/null
@@ -0,0 +1,40 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+   Contributed by Brendan Kehoe (brendan@zen.org).
+
+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>
+#define _ERRNO_H
+#include <errnos.h>
+
+ENTRY(syscall_error)
+#ifdef EWOULDBLOCK_sys
+       /* We translate the system's EWOULDBLOCK error into EAGAIN.
+          The GNU C library always defines EWOULDBLOCK==EAGAIN.
+          EWOULDBLOCK_sys is the original number.  */
+       subq v0, EWOULDBLOCK_sys, t0
+       cmoveq t0, EAGAIN, v0
+#endif
+
+       /* Store it in errno... */
+!      ldgp gp, 0(t12)
+       stl v0, errno
+
+       /* And just kick back a -1.  */
+       ldil v0, -1
+       ret
+
+       .end syscall_error
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h
new file mode 100644 (file)
index 0000000..279461b
--- /dev/null
@@ -0,0 +1,68 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+   Contributed by Brendan Kehoe (brendan@zen.org).
+
+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>
+#include <machine/pal.h>               /* get PAL_callsys */
+#include <regdef.h>
+
+#ifdef __STDC__
+#define ENTRY(name) \
+  .globl name;                                                               \
+  .ent name,0;                                                               \
+  name##:;                                                                   \
+  .frame sp,0,ra
+#else
+#define ENTRY(name) \
+  .globl name;                                                               \
+  .ent name,0;                                                               \
+  name/**/:;                                                                 \
+  .frame sp,0,ra
+#endif
+
+#ifdef __STDC__
+#define PSEUDO(name, syscall_name, args) \
+  ENTRY(name);                                                               \
+  ldiq v0, SYS_##syscall_name;                                               \
+  .set noat;                                                                 \
+  call_pal PAL_callsys;                                                              \
+  .set at;                                                                   \
+  beq a3, 10f;                                                               \
+  br gp, 20f;                                                                \
+20:;                                                                         \
+  ldgp gp, 0(gp);                                                            \
+  jmp zero, syscall_error;                                                   \
+10:
+#else
+#define PSEUDO(name, syscall_name, args) \
+  ENTRY(name);                                                               \
+  ldiq v0, SYS_/**/syscall_name;                                             \
+  .set noat;                                                                 \
+  call_pal PAL_callsys;                                                              \
+  .set at;                                                                   \
+  beq a3, 10f;                                                               \
+  br gp, 20f;                                                                \
+20:;                                                                         \
+  ldgp gp, 0(gp);                                                            \
+  jmp zero, syscall_error;                                                   \
+10:
+#endif
+
+#define ret            ret zero,(ra),1
+#define r0             v0
+#define r1             a4
+#define MOVE(x,y)      mov x, y
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S b/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S
new file mode 100644 (file)
index 0000000..d4d2b1c
--- /dev/null
@@ -0,0 +1,25 @@
+/* Copyright (C) 1991, 1992 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>
+
+#include <sys/ult_syscall.h>
+#define SYS_vhangup SYS_ult_vhangup
+
+SYSCALL (vhangup, 1)
+       ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S b/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S
new file mode 100644 (file)
index 0000000..0f76c62
--- /dev/null
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/__wait4.S>
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..47129a884533c7e97d899df8e2a536707da2f81e 100644 (file)
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/__waitpid.c>
This page took 0.081332 seconds and 5 git commands to generate.