* sysdeps/i386/fpu/e_expl.c: Mark c0 and c1 as const.
* sysdeps/ieee754/flt-32/s_expm1f.c: Make sure huge and tiny end
up in .rodata.
* sysdeps/ieee754/flt-32/e_exp2f.c: Make sure TWO127 and TWOM100
end up in .rodata.
* sysdeps/ieee754/flt-32/e_expf.c: Likewise.
* sysdeps/ieee754/dbl-64/e_exp2.c: Make sure TWO1023 and TWOM1000
end up in .rodata.
+2005-12-21 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/ieee754/dbl-64/halfulp.c: Mark tab54 as static and const.
+ * sysdeps/i386/fpu/e_expl.c: Mark c0 and c1 as const.
+ * sysdeps/ieee754/flt-32/s_expm1f.c: Make sure huge and tiny end
+ up in .rodata.
+ * sysdeps/ieee754/flt-32/e_exp2f.c: Make sure TWO127 and TWOM100
+ end up in .rodata.
+ * sysdeps/ieee754/flt-32/e_expf.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_exp2.c: Make sure TWO1023 and TWOM1000
+ end up in .rodata.
+
2005-12-21 Thorsten Kukuk <kukuk@suse.de>
* elf/readlib.c: Fix include of readelflib.c.
#include <math_private.h>
-static long double c0 = 1.44268798828125L;
-static long double c1 = 7.05260771340735992468e-6L;
+static const long double c0 = 1.44268798828125L;
+static const long double c1 = 7.05260771340735992468e-6L;
long double
__ieee754_expl (long double x)
/* Double-precision floating point 2^x.
- Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2001, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Geoffrey Keating <geoffk@ozemail.com.au>
#include "t_exp2.h"
-static const volatile double TWO1023 = 8.988465674311579539e+307;
-static const volatile double TWOM1000 = 9.3326361850321887899e-302;
+/* XXX I know the assembler generates a warning about incorrect section
+ attributes. But without the attribute here the compiler places the
+ constants in the .data section. Ideally the constant is placed in
+ .rodata.cst8 so that it can be merged, but gcc sucks, it ICEs when
+ we try to force this section on it. --drepper */
+static const volatile double TWO1023 __attribute__ ((section (".rodata")))
+ = 8.988465674311579539e+307;
+static const volatile double TWOM1000 __attribute__ ((section (".rodata")))
+ = 9.3326361850321887899e-302;
double
__ieee754_exp2 (double x)
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2005 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
double __ieee754_sqrt(double x);
-int4 tab54[32] = {
+static const int4 tab54[32] = {
262143, 11585, 1782, 511, 210, 107, 63, 42,
30, 22, 17, 14, 12, 10, 9, 7,
7, 6, 5, 5, 5, 4, 4, 4,
/* Single-precision floating point 2^x.
- Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2001, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Geoffrey Keating <geoffk@ozemail.com.au>
#include "t_exp2f.h"
-static const volatile float TWOM100 = 7.88860905e-31;
-static const volatile float TWO127 = 1.7014118346e+38;
+/* XXX I know the assembler generates a warning about incorrect section
+ attributes. But without the attribute here the compiler places the
+ constants in the .data section. Ideally the constant is placed in
+ .rodata.cst4 so that it can be merged, but gcc sucks, it ICEs when
+ we try to force this section on it. --drepper */
+static const volatile float TWOM100 __attribute__ ((section (".rodata")))
+ = 7.88860905e-31;
+static const volatile float TWO127 __attribute__ ((section (".rodata")))
+ = 1.7014118346e+38;
float
__ieee754_exp2f (float x)
/* Single-precision floating point e^x.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Geoffrey Keating <geoffk@ozemail.com.au>
extern const float __exp_deltatable[178];
extern const double __exp_atable[355] /* __attribute__((mode(DF))) */;
-static const volatile float TWOM100 = 7.88860905e-31;
-static const volatile float TWO127 = 1.7014118346e+38;
+/* XXX I know the assembler generates a warning about incorrect section
+ attributes. But without the attribute here the compiler places the
+ constants in the .data section. Ideally the constant is placed in
+ .rodata.cst4 so that it can be merged, but gcc sucks, it ICEs when
+ we try to force this section on it. --drepper */
+static const volatile float TWOM100 __attribute__ ((section (".rodata")))
+ = 7.88860905e-31;
+static const volatile float TWO127 __attribute__ ((section (".rodata")))
+ = 1.7014118346e+38;
float
__ieee754_expf (float x)
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#include "math.h"
#include "math_private.h"
-static const volatile float huge = 1.0e+30, tiny = 1.0e-30;
+/* XXX I know the assembler generates a warning about incorrect section
+ attributes. But without the attribute here the compiler places the
+ constants in the .data section. Ideally the constant is placed in
+ .rodata.cst4 so that it can be merged, but gcc sucks, it ICEs when
+ we try to force this section on it. --drepper */
+static const volatile float huge __attribute__ ((section (".rodata")))
+ = 1.0e+30;
+static const volatile float tiny __attribute__ ((section (".rodata")))
+ = 1.0e-30;
#ifdef __STDC__
static const float
}
/* argument reduction */
- if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */
+ if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */
if(hx < 0x3F851592) { /* and |x| < 1.5 ln2 */
if(xsb==0)
{hi = x - ln2_hi; lo = ln2_lo; k = 1;}
}
x = hi - lo;
c = (hi-x)-lo;
- }
+ }
else if(hx < 0x33000000) { /* when |x|<2**-25, return x */
t = huge+x; /* return x with inexact flags when x!=0 */
- return x - (t-(huge+x));
+ return x - (t-(huge+x));
}
else k = 0;