aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/alpha/s_copysign.S (renamed from sysdeps/alpha/copysign.S)0
-rw-r--r--sysdeps/alpha/s_fabs.S (renamed from sysdeps/alpha/fabs.S)5
-rw-r--r--sysdeps/generic/get_str.c213
-rw-r--r--sysdeps/generic/prof-freq.c59
-rw-r--r--sysdeps/i386/strrchr.S12
-rw-r--r--sysdeps/ieee754/cbrt.c120
-rw-r--r--sysdeps/ieee754/drem.c107
-rw-r--r--sysdeps/ieee754/logb.c48
-rw-r--r--sysdeps/ieee754/sqrt.c120
-rw-r--r--sysdeps/m68k/fpu/__math.h4
-rw-r--r--sysdeps/m68k/fpu/e_acos.c6
-rw-r--r--sysdeps/m68k/fpu/e_fmod.c7
-rw-r--r--sysdeps/m68k/fpu/k_cos.c2
-rw-r--r--sysdeps/m68k/fpu/k_sin.c4
-rw-r--r--sysdeps/m68k/fpu/k_tan.c6
-rw-r--r--sysdeps/m68k/fpu/s_atan.c1
-rw-r--r--sysdeps/m68k/fpu/s_frexp.c1
-rw-r--r--sysdeps/m68k/fpu/s_ilogb.c1
-rw-r--r--sysdeps/m68k/fpu/s_isinf.c1
-rw-r--r--sysdeps/m68k/fpu/s_ldexp.c1
-rw-r--r--sysdeps/m68k/fpu/s_modf.c1
-rw-r--r--sysdeps/m68k/s_isinfl.c (renamed from sysdeps/m68k/isinfl.c)0
-rw-r--r--sysdeps/m68k/s_isnanl.c (renamed from sysdeps/m68k/isnanl.c)0
-rw-r--r--sysdeps/mach/hurd/prof-freq.c2
-rw-r--r--sysdeps/sparc/e_sqrt.c (renamed from sysdeps/sparc/sqrt.c)2
-rw-r--r--sysdeps/stub/cbrt.c32
-rw-r--r--sysdeps/stub/cos.c32
-rw-r--r--sysdeps/stub/drem.c33
-rw-r--r--sysdeps/stub/isinf.c31
-rw-r--r--sysdeps/stub/isinfl.c33
-rw-r--r--sysdeps/stub/isnanl.c33
-rw-r--r--sysdeps/stub/logb.c31
-rw-r--r--sysdeps/stub/sin.c32
-rw-r--r--sysdeps/stub/sqrt.c32
-rw-r--r--sysdeps/tahoe/log10.c22
-rw-r--r--sysdeps/unix/sysv/linux/alpha/Dist1
-rw-r--r--sysdeps/unix/sysv/linux/i386/init-first.h27
-rw-r--r--sysdeps/unix/sysv/linux/m68k/init-first.h12
-rw-r--r--sysdeps/vax/Dist1
-rw-r--r--sysdeps/vax/bcmp.s57
-rw-r--r--sysdeps/vax/index.s99
-rw-r--r--sysdeps/vax/infnan.c62
-rw-r--r--sysdeps/vax/log10.c28
-rw-r--r--sysdeps/vax/memcmp.s2
-rw-r--r--sysdeps/vax/rindex.s113
-rw-r--r--sysdeps/vax/strchr.s2
-rw-r--r--sysdeps/vax/strrchr.s2
47 files changed, 46 insertions, 1394 deletions
diff --git a/sysdeps/alpha/copysign.S b/sysdeps/alpha/s_copysign.S
index 95eb608666..95eb608666 100644
--- a/sysdeps/alpha/copysign.S
+++ b/sysdeps/alpha/s_copysign.S
diff --git a/sysdeps/alpha/fabs.S b/sysdeps/alpha/s_fabs.S
index dff8390b5a..12c0abdf75 100644
--- a/sysdeps/alpha/fabs.S
+++ b/sysdeps/alpha/s_fabs.S
@@ -19,9 +19,10 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-ENTRY(fabs)
+ENTRY(__fabs)
.prologue 0
cpys $f31,$f16,$f0
ret
- END(fabs)
+ END(__fabs)
+weak_alias (__fabs, fabs)
diff --git a/sysdeps/generic/get_str.c b/sysdeps/generic/get_str.c
deleted file mode 100644
index 182815ee18..0000000000
--- a/sysdeps/generic/get_str.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/* __mpn_get_str -- Convert a MSIZE long limb vector pointed to by MPTR
- to a printable string in STR in base BASE.
-
-Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
-
-
-This file is part of the GNU C Library. Its master source is NOT part of
-the C library, however. This file is in fact copied from the GNU MP
-Library and its source lives there.
-
-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 "gmp.h"
-#include "gmp-impl.h"
-
-/* Convert the limb vector pointed to by MPTR and MSIZE long to a
- char array, using base BASE for the result array. Store the
- result in the character array STR. STR must point to an array with
- space for the largest possible number represented by a MSIZE long
- limb vector + 1 extra character.
-
- The result is NOT in Ascii, to convert it to printable format, add
- '0' or 'A' depending on the base and range.
-
- Return the number of digits in the result string.
- This may include some leading zeros.
-
- The limb vector pointed to by MPTR is clobbered. */
-
-size_t
-__mpn_get_str (str, base, mptr, msize)
- unsigned char *str;
- int base;
- mp_ptr mptr;
- mp_size_t msize;
-{
- mp_limb big_base;
-#if UDIV_NEEDS_NORMALIZATION || UDIV_TIME > 2 * UMUL_TIME
- int normalization_steps;
-#endif
-#if UDIV_TIME > 2 * UMUL_TIME
- mp_limb big_base_inverted;
-#endif
- unsigned int dig_per_u;
- mp_size_t out_len;
- register unsigned char *s;
-
- big_base = __mp_bases[base].big_base;
-
- s = str;
-
- /* Special case zero, as the code below doesn't handle it. */
- if (msize == 0)
- {
- s[0] = 0;
- return 1;
- }
-
- if ((base & (base - 1)) == 0)
- {
- /* The base is a power of 2. Make conversion from most
- significant side. */
- mp_limb n1, n0;
- register int bits_per_digit = big_base;
- register int x;
- register int bit_pos;
- register int i;
-
- n1 = mptr[msize - 1];
- count_leading_zeros (x, n1);
-
- /* BIT_POS should be R when input ends in least sign. nibble,
- R + bits_per_digit * n when input ends in n:th least significant
- nibble. */
-
- {
- int bits;
-
- bits = BITS_PER_MP_LIMB * msize - x;
- x = bits % bits_per_digit;
- if (x != 0)
- bits += bits_per_digit - x;
- bit_pos = bits - (msize - 1) * BITS_PER_MP_LIMB;
- }
-
- /* Fast loop for bit output. */
- i = msize - 1;
- for (;;)
- {
- bit_pos -= bits_per_digit;
- while (bit_pos >= 0)
- {
- *s++ = (n1 >> bit_pos) & ((1 << bits_per_digit) - 1);
- bit_pos -= bits_per_digit;
- }
- i--;
- if (i < 0)
- break;
- n0 = (n1 << -bit_pos) & ((1 << bits_per_digit) - 1);
- n1 = mptr[i];
- bit_pos += BITS_PER_MP_LIMB;
- *s++ = n0 | (n1 >> bit_pos);
- }
-
- *s = 0;
-
- return s - str;
- }
- else
- {
- /* General case. The base is not a power of 2. Make conversion
- from least significant end. */
-
- /* If udiv_qrnnd only handles divisors with the most significant bit
- set, prepare BIG_BASE for being a divisor by shifting it to the
- left exactly enough to set the most significant bit. */
-#if UDIV_NEEDS_NORMALIZATION || UDIV_TIME > 2 * UMUL_TIME
- count_leading_zeros (normalization_steps, big_base);
- big_base <<= normalization_steps;
-#if UDIV_TIME > 2 * UMUL_TIME
- /* Get the fixed-point approximation to 1/(BIG_BASE << NORMALIZATION_STEPS). */
- big_base_inverted = __mp_bases[base].big_base_inverted;
-#endif
-#endif
-
- dig_per_u = __mp_bases[base].chars_per_limb;
- out_len = ((size_t) msize * BITS_PER_MP_LIMB
- * __mp_bases[base].chars_per_bit_exactly) + 1;
- s += out_len;
-
- while (msize != 0)
- {
- int i;
- mp_limb n0, n1;
-
-#if UDIV_NEEDS_NORMALIZATION || UDIV_TIME > 2 * UMUL_TIME
- /* If we shifted BIG_BASE above, shift the dividend too, to get
- the right quotient. We need to do this every loop,
- since the intermediate quotients are OK, but the quotient from
- one turn in the loop is going to be the dividend in the
- next turn, and the dividend needs to be up-shifted. */
- if (normalization_steps != 0)
- {
- n0 = __mpn_lshift (mptr, mptr, msize, normalization_steps);
-
- /* If the shifting gave a carry out limb, store it and
- increase the length. */
- if (n0 != 0)
- {
- mptr[msize] = n0;
- msize++;
- }
- }
-#endif
-
- /* Divide the number at TP with BIG_BASE to get a quotient and a
- remainder. The remainder is our new digit in base BIG_BASE. */
- i = msize - 1;
- n1 = mptr[i];
-
- if (n1 >= big_base)
- n1 = 0;
- else
- {
- msize--;
- i--;
- }
-
- for (; i >= 0; i--)
- {
- n0 = mptr[i];
-#if UDIV_TIME > 2 * UMUL_TIME
- udiv_qrnnd_preinv (mptr[i], n1, n1, n0, big_base, big_base_inverted);
-#else
- udiv_qrnnd (mptr[i], n1, n1, n0, big_base);
-#endif
- }
-
-#if UDIV_NEEDS_NORMALIZATION || UDIV_TIME > 2 * UMUL_TIME
- /* If we shifted above (at previous UDIV_NEEDS_NORMALIZATION tests)
- the remainder will be up-shifted here. Compensate. */
- n1 >>= normalization_steps;
-#endif
-
- /* Convert N1 from BIG_BASE to a string of digits in BASE
- using single precision operations. */
- for (i = dig_per_u - 1; i >= 0; i--)
- {
- *--s = n1 % base;
- n1 /= base;
- if (n1 == 0 && msize == 0)
- break;
- }
- }
-
- while (s != str)
- *--s = 0;
- return out_len;
- }
-}
diff --git a/sysdeps/generic/prof-freq.c b/sysdeps/generic/prof-freq.c
index c69b43ec09..4ad42124e8 100644
--- a/sysdeps/generic/prof-freq.c
+++ b/sysdeps/generic/prof-freq.c
@@ -55,62 +55,3 @@ __profile_frequency ()
return 0;
return (1000000 / tim.it_interval.tv_usec);
}
-/* Return frequency of ticks reported by profil. Generic version. */
-/*-
- * Copyright (c) 1983, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-
-#include <sys/types.h>
-#include <sys/time.h>
-
-int
-__profile_frequency ()
-{
- /*
- * Discover the tick frequency of the machine if something goes wrong,
- * we return 0, an impossible hertz.
- */
- struct itimerval tim;
-
- tim.it_interval.tv_sec = 0;
- tim.it_interval.tv_usec = 1;
- tim.it_value.tv_sec = 0;
- tim.it_value.tv_usec = 0;
- setitimer(ITIMER_REAL, &tim, 0);
- setitimer(ITIMER_REAL, 0, &tim);
- if (tim.it_interval.tv_usec < 2)
- return 0;
- return (1000000 / tim.it_interval.tv_usec);
-}
-
-
diff --git a/sysdeps/i386/strrchr.S b/sysdeps/i386/strrchr.S
index 26d6a22d6b..58058e1195 100644
--- a/sysdeps/i386/strrchr.S
+++ b/sysdeps/i386/strrchr.S
@@ -1,6 +1,6 @@
-/* strchr (str, ch) -- Return pointer to last occurrence of CH in STR.
+/* strrchr (str, ch) -- Return pointer to last occurrence of CH in STR.
For Intel 80x86, x>=3.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>
Some optimisations by Alan Modra <Alan@SPRI.Levels.UniSA.Edu.Au>
This file is part of the GNU C Library.
@@ -84,7 +84,7 @@ L12: orb %dl, %dl /* is NUL? */
cmpb %dl, %cl /* compare byte */
jne L13 /* target found => return */
movl %esi, %eax /* remember pointer as result */
-L13: orb %cl, %cl /* is NUL? */
+L13: orb %dl, %dl /* is NUL? */
jz L2 /* yes => return NULL */
incl %esi /* increment pointer */
@@ -134,7 +134,11 @@ L13: orb %cl, %cl /* is NUL? */
/* These fill bytes make the main loop be correctly aligned.
We cannot use align because it is not the following instruction
which should be aligned. */
- .byte 0, 0, 0, 0, 0, 0, 0, 0
+ .byte 0, 0
+#ifndef PROF
+ /* Profiling adds some code and so changes the alignment. */
+ .byte 0
+#endif
L4: subl $4, %esi /* adjust pointer */
L41: subl $4, %esi
diff --git a/sysdeps/ieee754/cbrt.c b/sysdeps/ieee754/cbrt.c
deleted file mode 100644
index fe5fb95511..0000000000
--- a/sysdeps/ieee754/cbrt.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)cbrt.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <sys/cdefs.h>
-
-/* kahan's cube root (53 bits IEEE double precision)
- * for IEEE machines only
- * coded in C by K.C. Ng, 4/30/85
- *
- * Accuracy:
- * better than 0.667 ulps according to an error analysis. Maximum
- * error observed was 0.666 ulps in an 1,000,000 random arguments test.
- *
- * Warning: this code is semi machine dependent; the ordering of words in
- * a floatin