[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r18110 - in /fsf/trunk/libc: ./ debug/ string/ sysdeps/generic/ sysdeps/ieee754/ldbl-128/ sysdeps/ieee754/ldbl-64-128/ sysde...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r18110 - in /fsf/trunk/libc: ./ debug/ string/ sysdeps/generic/ sysdeps/ieee754/ldbl-128/ sysdeps/ieee754/ldbl-64-128/ sysde...
- From: eglibc@xxxxxxxxxx
- Date: Thu, 19 Apr 2012 00:01:42 -0000
Author: eglibc
Date: Thu Apr 19 00:01:41 2012
New Revision: 18110
Log:
Import glibc-mainline for 2012-04-19
Added:
fsf/trunk/libc/sysdeps/ieee754/ldbl-128/e_ilogbl.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-64-128/e_ilogbl.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/e_ilogbl.c
fsf/trunk/libc/sysdeps/powerpc/memmove.c
fsf/trunk/libc/sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c
Removed:
fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_ilogbl.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-64-128/s_ilogbl.c
fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_ilogbl.c
fsf/trunk/libc/sysdeps/sparc/sparc32/memcopy.h
fsf/trunk/libc/sysdeps/sparc/sparc64/memcopy.h
fsf/trunk/libc/sysdeps/sparc/sparc64/soft-fp/s_ilogbl.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/debug/strcat_chk.c
fsf/trunk/libc/debug/strcpy_chk.c
fsf/trunk/libc/debug/strncat_chk.c
fsf/trunk/libc/debug/strncpy_chk.c
fsf/trunk/libc/string/memchr.c
fsf/trunk/libc/string/memrchr.c
fsf/trunk/libc/string/rawmemchr.c
fsf/trunk/libc/string/strcat.c
fsf/trunk/libc/string/strchr.c
fsf/trunk/libc/string/strchrnul.c
fsf/trunk/libc/string/strcmp.c
fsf/trunk/libc/string/strcpy.c
fsf/trunk/libc/string/strncat.c
fsf/trunk/libc/string/strncmp.c
fsf/trunk/libc/string/strncpy.c
fsf/trunk/libc/sysdeps/generic/memcopy.h
fsf/trunk/libc/sysdeps/powerpc/powerpc32/power6/wordcopy.c
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power6/wordcopy.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Apr 19 00:01:41 2012
@@ -1,3 +1,72 @@
+2012-04-18 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/generic/memcopy.h (reg_char): Delete.
+ * debug/strcat_chk.c: Use char, not reg_char.
+ * debug/strcpy_chk.c: Likewise.
+ * debug/strncat_chk.c: Likewise.
+ * debug/strncpy_chk.c: Likewise.
+ * string/memchr.c: Likewise.
+ * string/memrchr.c: Likewise.
+ * string/rawmemchr.c: Likewise.
+ * string/strcat.c: Likewise.
+ * string/strchr.c: Likewise.
+ * string/strchrnul.c: Likewise.
+ * string/strcmp.c: Likewise.
+ * string/strcpy.c: Likewise.
+ * string/strncat.c: Likewise.
+ * string/strncmp.c: Likewise.
+ * string/strncpy.c: Likewise.
+
+2012-04-18 Will Schmidt <will_schmidt@xxxxxxxxxxxx>
+
+ * sysdeps/powerpc/memmove.c: New file based on string/memmove.c where
+ __builtin_memcopy is called when src and dest ranges are known to not
+ overlap.
+
+2012-04-18 Will Schmidt <will_schmidt@xxxxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc64/power6/wordcopy.c
+ (_wordcopy_fwd_dest_aligned): Replace switch with a parameterized
+ fwd_align_merge macro call.
+ (_wordcopy_bwd_dest_aligned): Replace switch with a parameterized
+ bwd_align_merge macro call.
+ * sysdeps/powerpc/powerpc32/power6/wordcopy.c: Likewise.
+
+2012-04-18 Will Schmidt <will_schmidt@xxxxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc64/power6/wordcopy.c: Add fwd_align_merge and
+ bwd_align_merge macros.
+ (_wordcopy_fwd_dest_aligned): Use fwd_align_merge macro calls.
+ (_wordcopy_bwd_dest_aligned): Use bwd_align_merge macro calls.
+ * sysdeps/powerpc/powerpc32/power6/wordcopy.c: Likewise.
+
+2012-04-18 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/sparc64/memcopy.h: Delete.
+
+2012-04-18 Andreas Jaeger <aj@xxxxxxx>
+
+ [BZ# 6794]
+ * sysdeps/ieee754/ldbl-96/s_ilogbl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-96/e_ilogbl.c: ... here.
+ Rename __ilogbl to __ieee754_ilogbl and remove weak_alias.
+
+ * sysdeps/ieee754/ldbl-128/s_ilogbl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-128/e_ilogbl.c: ... here.
+ Rename __ilogbl to __ieee754_ilogbl and remove weak_alias.
+
+ * sysdeps/ieee754/ldbl-64-128/s_ilogbl.c: Moved to ...
+ * sysdeps/ieee754/ldbl-64-128/e_ilogbl.c: ... here.
+ Adjust for changed ldbl-128 files.
+
+ * sysdeps/sparc/sparc64/soft-fp/s_ilogbl.c: Moved to ...
+ * sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c: ... here.
+ Rename __ilogbl to __ieee754_ilogbl and remove weak_alias.
+
+2012-04-17 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/sparc32/memcopy.h: Delete.
+
2012-04-17 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
* sysdeps/i386/fpu/e_ilogb.S: Remove __ilogb*_finite alias.
@@ -30,7 +99,7 @@
exception being thrown with 0.0 as argument.
* sysdeps/ieee754/dbl-64/s_ilogb.c: Moved to ...
* sysdeps/ieee754/dbl-64/e_ilogb.c: ... here.
- * sysdeps/ieee754/flt-32/e_ilogbf.c: Moved to ...
+ * sysdeps/ieee754/flt-32/s_ilogbf.c: Moved to ...
* sysdeps/ieee754/flt-32/e_ilogbf.c: ... here.
* sysdeps/ieee754/ldbl-128ibm/s_ilogbl.c: Moved to ...
* sysdeps/ieee754/ldbl-128ibm/e_ilogbl.c: ... here.
Modified: fsf/trunk/libc/debug/strcat_chk.c
==============================================================================
--- fsf/trunk/libc/debug/strcat_chk.c (original)
+++ fsf/trunk/libc/debug/strcat_chk.c Thu Apr 19 00:01:41 2012
@@ -28,7 +28,7 @@
{
char *s1 = dest;
const char *s2 = src;
- reg_char c;
+ char c;
/* Find the end of the string. */
do
Modified: fsf/trunk/libc/debug/strcpy_chk.c
==============================================================================
--- fsf/trunk/libc/debug/strcpy_chk.c (original)
+++ fsf/trunk/libc/debug/strcpy_chk.c Thu Apr 19 00:01:41 2012
@@ -28,7 +28,7 @@
const char *src;
size_t destlen;
{
- reg_char c;
+ char c;
char *s = (char *) src;
const ptrdiff_t off = dest - s;
Modified: fsf/trunk/libc/debug/strncat_chk.c
==============================================================================
--- fsf/trunk/libc/debug/strncat_chk.c (original)
+++ fsf/trunk/libc/debug/strncat_chk.c Thu Apr 19 00:01:41 2012
@@ -27,7 +27,7 @@
size_t n;
size_t s1len;
{
- reg_char c;
+ char c;
char *s = s1;
/* Find the end of S1. */
Modified: fsf/trunk/libc/debug/strncpy_chk.c
==============================================================================
--- fsf/trunk/libc/debug/strncpy_chk.c (original)
+++ fsf/trunk/libc/debug/strncpy_chk.c Thu Apr 19 00:01:41 2012
@@ -26,7 +26,7 @@
size_t n;
size_t s1len;
{
- reg_char c;
+ char c;
char *s = s1;
if (__builtin_expect (s1len < n, 0))
Modified: fsf/trunk/libc/string/memchr.c
==============================================================================
--- fsf/trunk/libc/string/memchr.c (original)
+++ fsf/trunk/libc/string/memchr.c Thu Apr 19 00:01:41 2012
@@ -30,8 +30,6 @@
#if defined _LIBC
# include <string.h>
# include <memcopy.h>
-#else
-# define reg_char char
#endif
#if HAVE_STDLIB_H || defined _LIBC
@@ -68,7 +66,7 @@
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
- unsigned reg_char c;
+ unsigned char c;
c = (unsigned char) c_in;
Modified: fsf/trunk/libc/string/memrchr.c
==============================================================================
--- fsf/trunk/libc/string/memrchr.c (original)
+++ fsf/trunk/libc/string/memrchr.c Thu Apr 19 00:01:41 2012
@@ -33,8 +33,6 @@
#if defined _LIBC
# include <string.h>
# include <memcopy.h>
-#else
-# define reg_char char
#endif
#if defined HAVE_LIMITS_H || defined _LIBC
@@ -71,7 +69,7 @@
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
- unsigned reg_char c;
+ unsigned char c;
c = (unsigned char) c_in;
Modified: fsf/trunk/libc/string/rawmemchr.c
==============================================================================
--- fsf/trunk/libc/string/rawmemchr.c (original)
+++ fsf/trunk/libc/string/rawmemchr.c Thu Apr 19 00:01:41 2012
@@ -31,8 +31,6 @@
# include <string.h>
# include <memcopy.h>
# include <stdlib.h>
-#else
-# define reg_char char
#endif
#if defined (HAVE_LIMITS_H) || defined (_LIBC)
@@ -59,7 +57,7 @@
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
- unsigned reg_char c;
+ unsigned char c;
c = (unsigned char) c_in;
Modified: fsf/trunk/libc/string/strcat.c
==============================================================================
--- fsf/trunk/libc/string/strcat.c (original)
+++ fsf/trunk/libc/string/strcat.c Thu Apr 19 00:01:41 2012
@@ -28,7 +28,7 @@
{
char *s1 = dest;
const char *s2 = src;
- reg_char c;
+ char c;
/* Find the end of the string. */
do
Modified: fsf/trunk/libc/string/strchr.c
==============================================================================
--- fsf/trunk/libc/string/strchr.c (original)
+++ fsf/trunk/libc/string/strchr.c Thu Apr 19 00:01:41 2012
@@ -36,7 +36,7 @@
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
- unsigned reg_char c;
+ unsigned char c;
c = (unsigned char) c_in;
Modified: fsf/trunk/libc/string/strchrnul.c
==============================================================================
--- fsf/trunk/libc/string/strchrnul.c (original)
+++ fsf/trunk/libc/string/strchrnul.c Thu Apr 19 00:01:41 2012
@@ -36,7 +36,7 @@
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
- unsigned reg_char c;
+ unsigned char c;
c = (unsigned char) c_in;
Modified: fsf/trunk/libc/string/strcmp.c
==============================================================================
--- fsf/trunk/libc/string/strcmp.c (original)
+++ fsf/trunk/libc/string/strcmp.c Thu Apr 19 00:01:41 2012
@@ -30,7 +30,7 @@
{
register const unsigned char *s1 = (const unsigned char *) p1;
register const unsigned char *s2 = (const unsigned char *) p2;
- unsigned reg_char c1, c2;
+ unsigned char c1, c2;
do
{
Modified: fsf/trunk/libc/string/strcpy.c
==============================================================================
--- fsf/trunk/libc/string/strcpy.c (original)
+++ fsf/trunk/libc/string/strcpy.c Thu Apr 19 00:01:41 2012
@@ -28,7 +28,7 @@
char *dest;
const char *src;
{
- reg_char c;
+ char c;
char *__unbounded s = (char *__unbounded) CHECK_BOUNDS_LOW (src);
const ptrdiff_t off = CHECK_BOUNDS_LOW (dest) - s - 1;
size_t n;
Modified: fsf/trunk/libc/string/strncat.c
==============================================================================
--- fsf/trunk/libc/string/strncat.c (original)
+++ fsf/trunk/libc/string/strncat.c Thu Apr 19 00:01:41 2012
@@ -19,8 +19,6 @@
#ifdef _LIBC
# include <memcopy.h>
-#else
-typedef char reg_char;
#endif
#ifndef STRNCAT
@@ -31,7 +29,7 @@
char *
STRNCAT (char *s1, const char *s2, size_t n)
{
- reg_char c;
+ char c;
char *s = s1;
/* Find the end of S1. */
Modified: fsf/trunk/libc/string/strncmp.c
==============================================================================
--- fsf/trunk/libc/string/strncmp.c (original)
+++ fsf/trunk/libc/string/strncmp.c Thu Apr 19 00:01:41 2012
@@ -31,8 +31,8 @@
int
STRNCMP (const char *s1, const char *s2, size_t n)
{
- unsigned reg_char c1 = '\0';
- unsigned reg_char c2 = '\0';
+ unsigned char c1 = '\0';
+ unsigned char c2 = '\0';
if (n >= 4)
{
Modified: fsf/trunk/libc/string/strncpy.c
==============================================================================
--- fsf/trunk/libc/string/strncpy.c (original)
+++ fsf/trunk/libc/string/strncpy.c Thu Apr 19 00:01:41 2012
@@ -27,7 +27,7 @@
char *
STRNCPY (char *s1, const char *s2, size_t n)
{
- reg_char c;
+ char c;
char *s = s1;
--s1;
Modified: fsf/trunk/libc/sysdeps/generic/memcopy.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/memcopy.h (original)
+++ fsf/trunk/libc/sysdeps/generic/memcopy.h Thu Apr 19 00:01:41 2012
@@ -60,9 +60,6 @@
/* Type to use for unaligned operations. */
typedef unsigned char byte;
-
-/* Optimal type for storing bytes in registers. */
-#define reg_char char
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define MERGE(w0, sh_1, w1, sh_2) (((w0) >> (sh_1)) | ((w1) << (sh_2)))
Added: fsf/trunk/libc/sysdeps/ieee754/ldbl-128/e_ilogbl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128/e_ilogbl.c (added)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128/e_ilogbl.c Thu Apr 19 00:01:41 2012
@@ -1,0 +1,56 @@
+/* s_ilogbl.c -- long double version of s_ilogb.c.
+ * Conversion to IEEE quad long double by Jakub Jelinek, jj@xxxxxxxxxxxxxxx
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/* ilogbl(long double x)
+ * return the binary exponent of non-zero x
+ * ilogbl(0) = FP_ILOGB0
+ * ilogbl(NaN) = FP_ILOGBNAN (no signal is raised)
+ * ilogbl(+-Inf) = INT_MAX (no signal is raised)
+ */
+
+#include <limits.h>
+#include <math.h>
+#include <math_private.h>
+
+int __ieee754_ilogbl (long double x)
+{
+ int64_t hx,lx;
+ int ix;
+
+ GET_LDOUBLE_WORDS64(hx,lx,x);
+ hx &= 0x7fffffffffffffffLL;
+ if(hx <= 0x0001000000000000LL) {
+ if((hx|lx)==0)
+ return FP_ILOGB0; /* ilogbl(0) = FP_ILOGB0 */
+ else /* subnormal x */
+ if(hx==0) {
+ for (ix = -16431; lx>0; lx<<=1) ix -=1;
+ } else {
+ for (ix = -16382, hx<<=15; hx>0; hx<<=1) ix -=1;
+ }
+ return ix;
+ }
+ else if (hx<0x7fff000000000000LL) return (hx>>48)-0x3fff;
+ else if (FP_ILOGBNAN != INT_MAX) {
+ /* ISO C99 requires ilogbl(+-Inf) == INT_MAX. */
+ if (((hx^0x7fff000000000000LL)|lx) == 0)
+ return INT_MAX;
+ }
+ return FP_ILOGBNAN;
+}
Removed: fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_ilogbl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_ilogbl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128/s_ilogbl.c (removed)
@@ -1,57 +1,0 @@
-/* s_ilogbl.c -- long double version of s_ilogb.c.
- * Conversion to IEEE quad long double by Jakub Jelinek, jj@xxxxxxxxxxxxxxx
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/* ilogbl(long double x)
- * return the binary exponent of non-zero x
- * ilogbl(0) = FP_ILOGB0
- * ilogbl(NaN) = FP_ILOGBNAN (no signal is raised)
- * ilogbl(+-Inf) = INT_MAX (no signal is raised)
- */
-
-#include <limits.h>
-#include <math.h>
-#include <math_private.h>
-
-int __ilogbl(long double x)
-{
- int64_t hx,lx;
- int ix;
-
- GET_LDOUBLE_WORDS64(hx,lx,x);
- hx &= 0x7fffffffffffffffLL;
- if(hx <= 0x0001000000000000LL) {
- if((hx|lx)==0)
- return FP_ILOGB0; /* ilogbl(0) = FP_ILOGB0 */
- else /* subnormal x */
- if(hx==0) {
- for (ix = -16431; lx>0; lx<<=1) ix -=1;
- } else {
- for (ix = -16382, hx<<=15; hx>0; hx<<=1) ix -=1;
- }
- return ix;
- }
- else if (hx<0x7fff000000000000LL) return (hx>>48)-0x3fff;
- else if (FP_ILOGBNAN != INT_MAX) {
- /* ISO C99 requires ilogbl(+-Inf) == INT_MAX. */
- if (((hx^0x7fff000000000000LL)|lx) == 0)
- return INT_MAX;
- }
- return FP_ILOGBNAN;
-}
-weak_alias (__ilogbl, ilogbl)
Added: fsf/trunk/libc/sysdeps/ieee754/ldbl-64-128/e_ilogbl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-64-128/e_ilogbl.c (added)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-64-128/e_ilogbl.c Thu Apr 19 00:01:41 2012
@@ -1,0 +1,2 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/ldbl-128/e_ilogbl.c>
Removed: fsf/trunk/libc/sysdeps/ieee754/ldbl-64-128/s_ilogbl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-64-128/s_ilogbl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-64-128/s_ilogbl.c (removed)
@@ -1,5 +1,0 @@
-#include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(n,a)
-#include <sysdeps/ieee754/ldbl-128/s_ilogbl.c>
-long_double_symbol (libm, __ilogbl, ilogbl);
Added: fsf/trunk/libc/sysdeps/ieee754/ldbl-96/e_ilogbl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-96/e_ilogbl.c (added)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-96/e_ilogbl.c Thu Apr 19 00:01:41 2012
@@ -1,0 +1,59 @@
+/* s_ilogbl.c -- long double version of s_ilogb.c.
+ * Conversion to long double by Ulrich Drepper,
+ * Cygnus Support, drepper@xxxxxxxxxxx
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/* ilogbl(long double x)
+ * return the binary exponent of non-zero x
+ * ilogbl(0) = FP_ILOGB0
+ * ilogbl(NaN) = FP_ILOGBNAN (no signal is raised)
+ * ilogbl(+-Inf) = INT_MAX (no signal is raised)
+ */
+
+#include <limits.h>
+#include <math.h>
+#include <math_private.h>
+
+int __ieee754_ilogbl (long double x)
+{
+ int32_t es,hx,lx,ix;
+
+ GET_LDOUBLE_EXP(es,x);
+ es &= 0x7fff;
+ if(es==0) {
+ GET_LDOUBLE_WORDS(es,hx,lx,x);
+ if((hx|lx)==0)
+ return FP_ILOGB0; /* ilogbl(0) = FP_ILOGB0 */
+ else /* subnormal x */
+ if(hx==0) {
+ for (ix = -16415; lx>0; lx<<=1) ix -=1;
+ } else {
+ for (ix = -16383; hx>0; hx<<=1) ix -=1;
+ }
+ return ix;
+ }
+ else if (es<0x7fff) return es-0x3fff;
+ else if (FP_ILOGBNAN != INT_MAX)
+ {
+ GET_LDOUBLE_WORDS(es,hx,lx,x);
+ if (((hx & 0x7fffffff)|lx) == 0)
+ /* ISO C99 requires ilogbl(+-Inf) == INT_MAX. */
+ return INT_MAX;
+ }
+ return FP_ILOGBNAN;
+}
Removed: fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_ilogbl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_ilogbl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-96/s_ilogbl.c (removed)
@@ -1,60 +1,0 @@
-/* s_ilogbl.c -- long double version of s_ilogb.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@xxxxxxxxxxx
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/* ilogbl(long double x)
- * return the binary exponent of non-zero x
- * ilogbl(0) = FP_ILOGB0
- * ilogbl(NaN) = FP_ILOGBNAN (no signal is raised)
- * ilogbl(+-Inf) = INT_MAX (no signal is raised)
- */
-
-#include <limits.h>
-#include <math.h>
-#include <math_private.h>
-
-int __ilogbl(long double x)
-{
- int32_t es,hx,lx,ix;
-
- GET_LDOUBLE_EXP(es,x);
- es &= 0x7fff;
- if(es==0) {
- GET_LDOUBLE_WORDS(es,hx,lx,x);
- if((hx|lx)==0)
- return FP_ILOGB0; /* ilogbl(0) = FP_ILOGB0 */
- else /* subnormal x */
- if(hx==0) {
- for (ix = -16415; lx>0; lx<<=1) ix -=1;
- } else {
- for (ix = -16383; hx>0; hx<<=1) ix -=1;
- }
- return ix;
- }
- else if (es<0x7fff) return es-0x3fff;
- else if (FP_ILOGBNAN != INT_MAX)
- {
- GET_LDOUBLE_WORDS(es,hx,lx,x);
- if (((hx & 0x7fffffff)|lx) == 0)
- /* ISO C99 requires ilogbl(+-Inf) == INT_MAX. */
- return INT_MAX;
- }
- return FP_ILOGBNAN;
-}
-weak_alias (__ilogbl, ilogbl)
Added: fsf/trunk/libc/sysdeps/powerpc/memmove.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/memmove.c (added)
+++ fsf/trunk/libc/sysdeps/powerpc/memmove.c Thu Apr 19 00:01:41 2012
@@ -1,0 +1,119 @@
+/* Copy memory to memory until the specified number of bytes
+ has been copied. Overlap is handled correctly.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Torbjorn Granlund (tege@xxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <string.h>
+#include <memcopy.h>
+#include <pagecopy.h>
+
+/* All this is so that bcopy.c can #include
+ this file after defining some things. */
+#ifndef a1
+#define a1 dest /* First arg is DEST. */
+#define a1const
+#define a2 src /* Second arg is SRC. */
+#define a2const const
+#undef memmove
+#endif
+#if !defined(RETURN) || !defined(rettype)
+#define RETURN(s) return (s) /* Return DEST. */
+#define rettype void *
+#endif
+
+#ifndef MEMMOVE
+#define MEMMOVE memmove
+#endif
+
+rettype
+MEMMOVE (a1, a2, len)
+ a1const void *a1;
+ a2const void *a2;
+ size_t len;
+{
+ unsigned long int dstp = (long int) dest;
+ unsigned long int srcp = (long int) src;
+
+ /* If there is no overlap between ranges, call the builtin memcpy. */
+ if ( (dstp >= (srcp + len)) || (srcp > (dstp + len)) )
+ return __builtin_memcpy (dest, src, len);
+
+ /* This test makes the forward copying code be used whenever possible.
+ Reduces the working set. */
+ if (dstp - srcp >= len) /* *Unsigned* compare! */
+ {
+ /* Copy from the beginning to the end. */
+
+ /* If there not too few bytes to copy, use word copy. */
+ if (len >= OP_T_THRES)
+ {
+ /* Copy just a few bytes to make DSTP aligned. */
+ len -= (-dstp) % OPSIZ;
+ BYTE_COPY_FWD (dstp, srcp, (-dstp) % OPSIZ);
+
+ /* Copy whole pages from SRCP to DSTP by virtual address
+ manipulation, as much as possible. */
+
+ PAGE_COPY_FWD_MAYBE (dstp, srcp, len, len);
+
+ /* Copy from SRCP to DSTP taking advantage of the known
+ alignment of DSTP. Number of bytes remaining is put
+ in the third argument, i.e. in LEN. This number may
+ vary from machine to machine. */
+
+ WORD_COPY_FWD (dstp, srcp, len, len);
+
+ /* Fall out and copy the tail. */
+ }
+
+ /* There are just a few bytes to copy. Use byte memory operations. */
+ BYTE_COPY_FWD (dstp, srcp, len);
+ }
+ else
+ {
+ /* Copy from the end to the beginning. */
+ srcp += len;
+ dstp += len;
+
+ /* If there not too few bytes to copy, use word copy. */
+ if (len >= OP_T_THRES)
+ {
+ /* Copy just a few bytes to make DSTP aligned. */
+ len -= dstp % OPSIZ;
+ BYTE_COPY_BWD (dstp, srcp, dstp % OPSIZ);
+
+ /* Copy from SRCP to DSTP taking advantage of the known
+ alignment of DSTP. Number of bytes remaining is put
+ in the third argument, i.e. in LEN. This number may
+ vary from machine to machine. */
+
+ WORD_COPY_BWD (dstp, srcp, len, len);
+
+ /* Fall out and copy the tail. */
+ }
+
+ /* There are just a few bytes to copy. Use byte memory operations. */
+ BYTE_COPY_BWD (dstp, srcp, len);
+ }
+
+ RETURN (dest);
+}
+#ifndef memmove
+libc_hidden_builtin_def (memmove)
+#endif
Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc32/power6/wordcopy.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/power6/wordcopy.c (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/power6/wordcopy.c Thu Apr 19 00:01:41 2012
@@ -1,5 +1,5 @@
/* _memcopy.c -- subroutines for memory copy functions.
- Copyright (C) 1991, 1996, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@xxxxxxx).
Updated for POWER6 by Steven Munroe (sjmunroe@xxxxxxxxxx).
@@ -65,6 +65,20 @@
DSTP should be aligned for memory operations on `op_t's, but SRCP must
*not* be aligned. */
+#define fwd_align_merge(align) \
+ do \
+ { \
+ a1 = ((op_t *) srcp)[1]; \
+ a2 = ((op_t *) srcp)[2]; \
+ ((op_t *) dstp)[0] = MERGE (a0, align*8, a1, (32-align*8)); \
+ ((op_t *) dstp)[1] = MERGE (a1, align*8, a2, (32-align*8)); \
+ a0 = a2; \
+ srcp += 2 * OPSIZ; \
+ dstp += 2 * OPSIZ; \
+ len -= 2; \
+ } \
+ while (len != 0)
+
void
_wordcopy_fwd_dest_aligned (dstp, srcp, len)
long int dstp;
@@ -101,54 +115,7 @@
len -= 1;
}
- switch (align)
- {
- case 1:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 8, a1, (32-8));
- ((op_t *) dstp)[1] = MERGE (a1, 8, a2, (32-8));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 2:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 16, a1, (32-16));
- ((op_t *) dstp)[1] = MERGE (a1, 16, a2, (32-16));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 3:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 24, a1, (32-24));
- ((op_t *) dstp)[1] = MERGE (a1, 24, a2, (32-24));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- }
+ fwd_align_merge (align);
}
@@ -191,6 +158,20 @@
while (len != 0);
}
+#define bwd_align_merge(align) \
+ do \
+ { \
+ srcp -= 2 * OPSIZ; \
+ dstp -= 2 * OPSIZ; \
+ a1 = ((op_t *) srcp)[1]; \
+ a0 = ((op_t *) srcp)[0]; \
+ ((op_t *) dstp)[1] = MERGE (a1, align*8, a2, (32-align*8)); \
+ ((op_t *) dstp)[0] = MERGE (a0, align*8, a1, (32-align*8)); \
+ a2 = a0; \
+ len -= 2; \
+ } \
+ while (len != 0)
+
/* _wordcopy_bwd_dest_aligned -- Copy block finishing right
before SRCP to block finishing right before DSTP with LEN `op_t'
words (not LEN bytes!). DSTP should be aligned for memory
@@ -232,55 +213,5 @@
len -= 1;
}
- switch (align)
- {
- case 1:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 8, a2, (32-8));
- ((op_t *) dstp)[0] = MERGE (a0, 8, a1, (32-8));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 2:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 16, a2, (32-16));
- ((op_t *) dstp)[0] = MERGE (a0, 16, a1, (32-16));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 3:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 24, a2, (32-24));
- ((op_t *) dstp)[0] = MERGE (a0, 24, a1, (32-24));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- }
-}
+ bwd_align_merge (align);
+}
Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc64/power6/wordcopy.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/power6/wordcopy.c (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/power6/wordcopy.c Thu Apr 19 00:01:41 2012
@@ -1,5 +1,5 @@
/* _memcopy.c -- subroutines for memory copy functions.
- Copyright (C) 1991, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@xxxxxxx).
@@ -59,6 +59,21 @@
while (len != 0);
}
+#define fwd_align_merge(align) \
+ do \
+ { \
+ a1 = ((op_t *) srcp)[1]; \
+ a2 = ((op_t *) srcp)[2]; \
+ ((op_t *) dstp)[0] = MERGE (a0, align*8, a1, (64-align*8)); \
+ ((op_t *) dstp)[1] = MERGE (a1, align*8, a2, (64-align*8)); \
+ a0 = a2; \
+ srcp += 2 * OPSIZ; \
+ dstp += 2 * OPSIZ; \
+ len -= 2; \
+ } \
+ while (len != 0)
+
+
/* _wordcopy_fwd_dest_aligned -- Copy block beginning at SRCP to
block beginning at DSTP with LEN `op_t' words (not LEN bytes!).
DSTP should be aligned for memory operations on `op_t's, but SRCP must
@@ -100,114 +115,7 @@
len -= 1;
}
- switch (align)
- {
- case 1:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 8, a1, (64-8));
- ((op_t *) dstp)[1] = MERGE (a1, 8, a2, (64-8));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 2:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 16, a1, (64-16));
- ((op_t *) dstp)[1] = MERGE (a1, 16, a2, (64-16));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 3:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 24, a1, (64-24));
- ((op_t *) dstp)[1] = MERGE (a1, 24, a2, (64-24));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 4:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 32, a1, (64-32));
- ((op_t *) dstp)[1] = MERGE (a1, 32, a2, (64-32));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 5:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 40, a1, (64-40));
- ((op_t *) dstp)[1] = MERGE (a1, 40, a2, (64-40));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 6:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 48, a1, (64-48));
- ((op_t *) dstp)[1] = MERGE (a1, 48, a2, (64-48));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- case 7:
- do
- {
- a1 = ((op_t *) srcp)[1];
- a2 = ((op_t *) srcp)[2];
- ((op_t *) dstp)[0] = MERGE (a0, 56, a1, (64-56));
- ((op_t *) dstp)[1] = MERGE (a1, 56, a2, (64-56));
- a0 = a2;
-
- srcp += 2 * OPSIZ;
- dstp += 2 * OPSIZ;
- len -= 2;
- }
- while (len != 0);
- break;
- }
+ fwd_align_merge (align);
}
@@ -250,6 +158,20 @@
while (len != 0);
}
+#define bwd_align_merge(align) \
+ do \
+ { \
+ srcp -= 2 * OPSIZ; \
+ dstp -= 2 * OPSIZ; \
+ a1 = ((op_t *) srcp)[1]; \
+ a0 = ((op_t *) srcp)[0]; \
+ ((op_t *) dstp)[1] = MERGE (a1, align*8, a2, (64-align*8)); \
+ ((op_t *) dstp)[0] = MERGE (a0, align*8, a1, (64-align*8)); \
+ a2 = a0; \
+ len -= 2; \
+ } \
+ while (len != 0)
+
/* _wordcopy_bwd_dest_aligned -- Copy block finishing right
before SRCP to block finishing right before DSTP with LEN `op_t'
words (not LEN bytes!). DSTP should be aligned for memory
@@ -291,119 +213,5 @@
len -= 1;
}
- switch (align)
- {
- case 1:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 8, a2, (64-8));
- ((op_t *) dstp)[0] = MERGE (a0, 8, a1, (64-8));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 2:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 16, a2, (64-16));
- ((op_t *) dstp)[0] = MERGE (a0, 16, a1, (64-16));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 3:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 24, a2, (64-24));
- ((op_t *) dstp)[0] = MERGE (a0, 24, a1, (64-24));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 4:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 32, a2, (64-32));
- ((op_t *) dstp)[0] = MERGE (a0, 32, a1, (64-32));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 5:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 40, a2, (64-40));
- ((op_t *) dstp)[0] = MERGE (a0, 40, a1, (64-40));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 6:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 48, a2, (64-48));
- ((op_t *) dstp)[0] = MERGE (a0, 48, a1, (64-48));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- case 7:
- do
- {
- srcp -= 2 * OPSIZ;
- dstp -= 2 * OPSIZ;
-
- a1 = ((op_t *) srcp)[1];
- a0 = ((op_t *) srcp)[0];
- ((op_t *) dstp)[1] = MERGE (a1, 56, a2, (64-56));
- ((op_t *) dstp)[0] = MERGE (a0, 56, a1, (64-56));
- a2 = a0;
-
- len -= 2;
- }
- while (len != 0);
- break;
- }
-}
+ bwd_align_merge (align);
+}
Removed: fsf/trunk/libc/sysdeps/sparc/sparc32/memcopy.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/memcopy.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/memcopy.h (removed)
@@ -1,20 +1,0 @@
-/* Copyright (C) 1991, 1997 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sysdeps/generic/memcopy.h>
-#undef reg_char
-#define reg_char int
Removed: fsf/trunk/libc/sysdeps/sparc/sparc64/memcopy.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/memcopy.h (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/memcopy.h (removed)
@@ -1,1 +1,0 @@
-#include <sparc32/memcopy.h>
Added: fsf/trunk/libc/sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c Thu Apr 19 00:01:41 2012
@@ -1,0 +1,79 @@
+/* Software floating-point emulation.
+ ilogbl(x, exp)
+ Copyright (C) 1999, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek (jj@xxxxxxxxxxxxxx).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* ilogbl(long double x)
+ * return the binary exponent of non-zero x
+ * ilogbl(0) = 0x80000001
+ * ilogbl(inf/NaN) = 0x7fffffff (no signal is raised)
+ */
+
+#include "soft-fp.h"
+#include "quad.h"
+#include <math.h>
+
+int __ieee754_ilogbl (long double x)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(X);
+
+/*
+ FP_UNPACK_Q(X, x);
+ switch (X_c)
+ {
+ case FP_CLS_ZERO:
+ return FP_ILOGB0;
+ case FP_CLS_NAN:
+ case FP_CLS_INF:
+ return FP_ILOGBNAN;
+ default:
+ return X_e;
+ }
+ */
+ FP_UNPACK_RAW_Q(X, x);
+ switch (X_e)
+ {
+ default:
+ return X_e - _FP_EXPBIAS_Q;
+ case 0:
+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+ if (_FP_FRAC_ZEROP_4(X))
+ return FP_ILOGB0;
+ else
+ {
+ _FP_I_TYPE shift;
+ _FP_FRAC_CLZ_4(shift, X);
+ shift -= _FP_FRACXBITS_Q;
+ return X_e - _FP_EXPBIAS_Q - 1 + shift;
+ }
+#else
+ if (_FP_FRAC_ZEROP_2(X))
+ return FP_ILOGB0;
+ else
+ {
+ _FP_I_TYPE shift;
+ _FP_FRAC_CLZ_2(shift, X);
+ shift -= _FP_FRACXBITS_Q;
+ return X_e - _FP_EXPBIAS_Q - 1 + shift;
+ }
+#endif
+ case _FP_EXPBIAS_Q:
+ return FP_ILOGBNAN;
+ }
+}
Removed: fsf/trunk/libc/sysdeps/sparc/sparc64/soft-fp/s_ilogbl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/soft-fp/s_ilogbl.c (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/soft-fp/s_ilogbl.c (removed)
@@ -1,81 +1,0 @@
-/* Software floating-point emulation.
- ilogbl(x, exp)
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek (jj@xxxxxxxxxxxxxx).
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-/* ilogbl(long double x)
- * return the binary exponent of non-zero x
- * ilogbl(0) = 0x80000001
- * ilogbl(inf/NaN) = 0x7fffffff (no signal is raised)
- */
-
-#include "soft-fp.h"
-#include "quad.h"
-#include <math.h>
-
-int __ilogbl(long double x)
-{
- FP_DECL_EX;
- FP_DECL_Q(X);
-
-/*
- FP_UNPACK_Q(X, x);
- switch (X_c)
- {
- case FP_CLS_ZERO:
- return FP_ILOGB0;
- case FP_CLS_NAN:
- case FP_CLS_INF:
- return FP_ILOGBNAN;
- default:
- return X_e;
- }
- */
- FP_UNPACK_RAW_Q(X, x);
- switch (X_e)
- {
- default:
- return X_e - _FP_EXPBIAS_Q;
- case 0:
-#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
- if (_FP_FRAC_ZEROP_4(X))
- return FP_ILOGB0;
- else
- {
- _FP_I_TYPE shift;
- _FP_FRAC_CLZ_4(shift, X);
- shift -= _FP_FRACXBITS_Q;
- return X_e - _FP_EXPBIAS_Q - 1 + shift;
- }
-#else
- if (_FP_FRAC_ZEROP_2(X))
- return FP_ILOGB0;
- else
- {
- _FP_I_TYPE shift;
- _FP_FRAC_CLZ_2(shift, X);
- shift -= _FP_FRACXBITS_Q;
- return X_e - _FP_EXPBIAS_Q - 1 + shift;
- }
-#endif
- case _FP_EXPBIAS_Q:
- return FP_ILOGBNAN;
- }
-}
-
-weak_alias (__ilogbl, ilogbl)
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits