summaryrefslogtreecommitdiff
path: root/sysdeps/alpha/memchr.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-03-17 01:58:17 +0000
committerRoland McGrath <roland@gnu.org>1996-03-17 01:58:17 +0000
commit6025c399e9fd73efeb5b93db78ec021d3fce2b1c (patch)
treee213f46f05f3cb8638d22a81d437a32754062173 /sysdeps/alpha/memchr.c
parentd3b7d2ac93ed6fce3f7cb8e567d2b96719dde01a (diff)
Sat Mar 16 20:08:22 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.S: new file. * sysdeps/alpha/memchr.c: obsolete file removed. Sat Mar 16 16:26:09 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * misc/Makefile (headers): Add sysexits.h. * misc/sysexits.h: New file. Thu Mar 14 15:20:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/libm-ieee754/e_atan2.c (__ieee754_atan2): Change atan call to __atan. * sysdeps/libm-ieee754/e_atan2f.c (__ieee754_atan2f): Change atanf call to __atanf. * sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c, sysdeps/m68k/fpu/e_asin.c, sysdeps/m68k/fpu/e_asinf.c, sysdeps/m68k/fpu/e_atanh.c, sysdeps/m68k/fpu/e_atanhf.c, sysdeps/m68k/fpu/e_cosh.c, sysdeps/m68k/fpu/e_coshf.c, sysdeps/m68k/fpu/e_exp.c, sysdeps/m68k/fpu/e_expf.c, sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c, sysdeps/m68k/fpu/e_log.c, sysdeps/m68k/fpu/e_log10.c, sysdeps/m68k/fpu/e_log10f.c, sysdeps/m68k/fpu/e_logf.c, sysdeps/m68k/fpu/e_pow.c, sysdeps/m68k/fpu/e_powf.c, sysdeps/m68k/fpu/e_remainder.c, sysdeps/m68k/fpu/e_remainderf.c, sysdeps/m68k/fpu/e_scalb.c, sysdeps/m68k/fpu/e_scalbf.c, sysdeps/m68k/fpu/e_sinh.c, sysdeps/m68k/fpu/e_sinhf.c, sysdeps/m68k/fpu/e_sqrt.c, sysdeps/m68k/fpu/e_sqrtf.c, sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_cosf.c, sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_sinf.c, sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/k_tanf.c, sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c, sysdeps/m68k/fpu/s_ceil.c, sysdeps/m68k/fpu/s_ceilf.c, sysdeps/m68k/fpu/s_cos.c, sysdeps/m68k/fpu/s_cosf.c, sysdeps/m68k/fpu/s_expm1.c, sysdeps/m68k/fpu/s_expm1f.c, sysdeps/m68k/fpu/s_fabs.c, sysdeps/m68k/fpu/s_fabsf.c, sysdeps/m68k/fpu/s_finite.c, sysdeps/m68k/fpu/s_finitef.c, sysdeps/m68k/fpu/s_floor.c, sysdeps/m68k/fpu/s_floorf.c, sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c, sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c, sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c, sysdeps/m68k/fpu/s_isnan.c, sysdeps/m68k/fpu/s_isnanf.c, sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c, sysdeps/m68k/fpu/s_log1p.c, sysdeps/m68k/fpu/s_log1pf.c, sysdeps/m68k/fpu/s_logb.c, sysdeps/m68k/fpu/s_logbf.c, sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c, sysdeps/m68k/fpu/s_rint.c, sysdeps/m68k/fpu/s_rintf.c, sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c, sysdeps/m68k/fpu/s_significand.c, sysdeps/m68k/fpu/s_significandf.c, sysdeps/m68k/fpu/s_sin.c, sysdeps/m68k/fpu/s_sinf.c, sysdeps/m68k/fpu/s_tan.c, sysdeps/m68k/fpu/s_tanf.c, sysdeps/m68k/fpu/s_tanh.c, sysdeps/m68k/fpu/s_tanhf.c: New files, for m68881 port of fdlibm. * sysdeps/m68k/fpu/__math.h: Rewritten for fdlibm. * sysdeps/m68k/fpu/isinfl.c: Rewritten to get argument type right. * sysdeps/m68k/fpu/isnanl.c: Likewise. Thu Mar 14 06:01:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> * posix/glob.c (glob): In GLOB_BRACE brace expansion, fix buffer size calculation to include trailing invariant portion. Don't use alloca; instead use a dynamic auto array for GCC, malloc for non-GCC. Handle nested braces properly. * elf/elf.h (Elf32_auxv_t): Specify prototype (void) for `a_un.a_fcn'. * libc-symbols.h (lint): New macro. Fri Mar 15 01:18:00 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * libio/iosetvbuf.c: Add weak alias setvbuf.
Diffstat (limited to 'sysdeps/alpha/memchr.c')
-rw-r--r--sysdeps/alpha/memchr.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c
deleted file mode 100644
index a911302ea6..0000000000
--- a/sysdeps/alpha/memchr.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
-
-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 <string.h>
-
-/* Search no more than N bytes of S for C. */
-
-void *
-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;
-
- /* 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 = s; n > 0 && ((unsigned long int) char_ptr & 7) != 0;
- --n, ++char_ptr)
- 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;
-
- 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));
-
- /* Set bits in LE if bytes in CHARMASK are <= bytes in LONGWORD. */
- asm ("cmpbge %2, %1, %0" : "=r" (le) : "r" (charmask), "r" (longword));
-
- /* Bytes that are both <= and >= are == to C. */
- if (ge & le)
- {
- /* Which of the bytes was the C? */
-
- unsigned char *cp = (unsigned char *) (longword_ptr - 1);
- int i;
-
- for (i = 0; i < 7; i++)
- if (cp[i] == c)
- return &cp[i];
- return &cp[7];
- }
-
- if (x == (size_t)0)
- break;
- }
-
- return NULL;
-}