Commit 88e23c50 by Richard Guenther Committed by Richard Biener

re PR bootstrap/26050 (Use of u_int32_t in libgcc-math breaks bootstrap on Solaris 10/x86)

2006-02-07  Richard Guenther  <rguenther@suse.de>

	PR bootstrap/26050
	* configure.ac: Generate gstdint.h using GCC_HEADER_STDINT.
	* configure: Re-generate.
	* Makefile.in: Likewise. 
	* aclocal.m4: Likewise.
	* i386/Makefile.am: Adjust include path.
	* i386/Makefile.in: Re-generate.
	* include/math_private.h: Do not include sys/types.h.
	Include gstdint.h.  Use uint32_t instead of u_int32_t.
	* flt-32/e_expf.c: Do not include inttypes.h
	* flt-32/e_sqrtf.c: Use uint32_t instead of u_int32_t.
	* flt-32/s_floorf.c: Likewise.
	* flt-32/e_atan2f.c: Likewise.
	* flt-32/e_powf.c: Likewise.
	* flt-32/e_rem_pio2f.c: Likewise.
	* flt-32/e_log10f.c: Likewise.
	* dbl-64/s_floor.c: Likewise.
	* dbl-64/e_log10.c: Likewise.
	* dbl-64/e_rem_pio2.c: Likewise.

From-SVN: r110694
parent e7e93965
2006-02-07 Richard Guenther <rguenther@suse.de>
PR bootstrap/26050
* configure.ac: Generate _stdint.h using GCC_HEADER_STDINT.
* configure: Re-generate.
* Makefile.in: Likewise.
* aclocal.m4: Likewise.
* i386/Makefile.am: Adjust include path.
* i386/Makefile.in: Re-generate.
* include/math_private.h: Do not include sys/types.h.
Include _stdint.h. Use uint32_t instead of u_int32_t.
* flt-32/e_expf.c: Do not include inttypes.h
* flt-32/e_sqrtf.c: Use uint32_t instead of u_int32_t.
* flt-32/s_floorf.c: Likewise.
* flt-32/e_atan2f.c: Likewise.
* flt-32/e_powf.c: Likewise.
* flt-32/e_rem_pio2f.c: Likewise.
* flt-32/e_log10f.c: Likewise.
* dbl-64/s_floor.c: Likewise.
* dbl-64/e_log10.c: Likewise.
* dbl-64/e_rem_pio2.c: Likewise.
2006-02-01 Richard Guenther <rguenther@suse.de>
PR bootstrap/26059
......
......@@ -47,7 +47,8 @@ subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/../config/stdint.m4 $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
......@@ -127,6 +128,7 @@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
......
......@@ -937,4 +937,5 @@ AC_SUBST([am__untar])
m4_include([../config/depstand.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/stdint.m4])
m4_include([../libtool.m4])
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -123,6 +123,7 @@ else
multilib_arg=
fi
GCC_HEADER_STDINT(gstdint.h)
# Check for target library dependencies
cannot_build=no
......
......@@ -75,7 +75,7 @@ static double zero = 0.0;
{
double y,z;
int32_t i,k,hx;
u_int32_t lx;
uint32_t lx;
EXTRACT_WORDS(hx,lx,x);
......@@ -89,7 +89,7 @@ static double zero = 0.0;
}
if (hx >= 0x7ff00000) return x+x;
k += (hx>>20)-1023;
i = ((u_int32_t)k&0x80000000)>>31;
i = ((uint32_t)k&0x80000000)>>31;
hx = (hx&0x000fffff)|((0x3ff-i)<<20);
y = (double)(k+i);
SET_HIGH_WORD(x,hx);
......
......@@ -93,7 +93,7 @@ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
double z,w,t,r,fn;
double tx[3];
int32_t e0,i,j,nx,n,ix,hx;
u_int32_t low;
uint32_t low;
GET_HIGH_WORD(hx,x); /* high word of x */
ix = hx&0x7fffffff;
......@@ -133,7 +133,7 @@ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
if(n<32&&ix!=npio2_hw[n-1]) {
y[0] = r-w; /* quick check no cancellation */
} else {
u_int32_t high;
uint32_t high;
j = ix>>20;
y[0] = r-w;
GET_HIGH_WORD(high,y[0]);
......
......@@ -40,7 +40,7 @@ static double huge = 1.0e300;
#endif
{
int32_t i0,i1,j0;
u_int32_t i,j;
uint32_t i,j;
EXTRACT_WORDS(i0,i1,x);
j0 = ((i0>>20)&0x7ff)-0x3ff;
if(j0<20) {
......@@ -62,7 +62,7 @@ static double huge = 1.0e300;
if(j0==0x400) return x+x; /* inf or NaN */
else return x; /* x is integral */
} else {
i = ((u_int32_t)(0xffffffff))>>(j0-20);
i = ((uint32_t)(0xffffffff))>>(j0-20);
if((i1&i)==0) return x; /* x is integral */
if(huge+x>0.0) { /* raise inexact flag */
if(i0<0) {
......
......@@ -93,7 +93,7 @@ pi_lo = -8.7422776573e-08; /* 0xb3bbbd2e */
switch (m) {
case 0: return z ; /* atan(+,+) */
case 1: {
u_int32_t zh;
uint32_t zh;
GET_FLOAT_WORD(zh,z);
SET_FLOAT_WORD(z,zh ^ 0x80000000);
}
......
......@@ -53,7 +53,6 @@
#include <float.h>
#include <ieee754.h>
#include <math.h>
#include <inttypes.h>
#include <math_private.h>
extern const float __exp_deltatable[178];
......
......@@ -58,7 +58,7 @@ static float zero = 0.0;
}
if (hx >= 0x7f800000) return x+x;
k += (hx>>23)-127;
i = ((u_int32_t)k&0x80000000)>>31;
i = ((uint32_t)k&0x80000000)>>31;
hx = (hx&0x007fffff)|((0x7f-i)<<23);
y = (float)(k+i);
SET_FLOAT_WORD(x,hx);
......
......@@ -133,7 +133,7 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
}
/* (x<0)**(non-int) is NaN */
if(((((u_int32_t)hx>>31)-1)|yisint)==0) return (x-x)/(x-x);
if(((((uint32_t)hx>>31)-1)|yisint)==0) return (x-x)/(x-x);
/* |y| is huge */
if(iy>0x4d000000) { /* if |y| > 2**27 */
......@@ -204,7 +204,7 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
}
s = one; /* s (sign of result -ve**odd) = -1 else = 1 */
if(((((u_int32_t)hx>>31)-1)|(yisint-1))==0)
if(((((uint32_t)hx>>31)-1)|(yisint-1))==0)
s = -one; /* (-ve)**(odd int) */
/* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */
......@@ -221,7 +221,7 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
}
else if ((j&0x7fffffff)>0x43160000) /* z <= -150 */
return s*tiny*tiny; /* underflow */
else if ((u_int32_t) j==0xc3160000){ /* z == -150 */
else if ((uint32_t) j==0xc3160000){ /* z == -150 */
if(p_l<=z-p_h) return s*tiny*tiny; /* underflow */
}
/*
......
......@@ -148,7 +148,7 @@ pio2_3t = 6.1232342629e-17; /* 0x248d3132 */
if(n<32&&(int32_t)(ix&0xffffff00)!=npio2_hw[n-1]) {
y[0] = r-w; /* quick check no cancellation */
} else {
u_int32_t high;
uint32_t high;
j = ix>>23;
y[0] = r-w;
GET_FLOAT_WORD(high,y[0]);
......
......@@ -36,7 +36,7 @@ static float one = 1.0, tiny=1.0e-30;
float z;
int32_t sign = (int)0x80000000;
int32_t ix,s,q,m,t,i;
u_int32_t r;
uint32_t r;
GET_FLOAT_WORD(ix,x);
......
......@@ -43,7 +43,7 @@ static float huge = 1.0e30;
#endif
{
int32_t i0,j0;
u_int32_t i;
uint32_t i;
GET_FLOAT_WORD(i0,x);
j0 = ((i0>>23)&0xff)-0x7f;
if(j0<23) {
......
......@@ -10,7 +10,7 @@ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
noinst_LTLIBRARIES = libsse2.la
libsse2_la_CFLAGS = -I@srcdir@/../include -include @srcdir@/sse2.h \
libsse2_la_CFLAGS = -I@srcdir@/../include -I.. -include @srcdir@/sse2.h \
-Wall -O2 -g -msse2 -msseregparm -mfpmath=sse -march=pentium3 \
-fno-math-errno -fno-trapping-math -ffinite-math-only \
-fno-rounding-math -fno-signaling-nans -D__NO_MATH_INLINES
......
......@@ -42,7 +42,8 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/../config/stdint.m4 $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
......@@ -112,6 +113,7 @@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
......@@ -197,7 +199,7 @@ toolexeclibdir = @toolexeclibdir@
# May be used by various substitution variables.
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
noinst_LTLIBRARIES = libsse2.la
libsse2_la_CFLAGS = -I@srcdir@/../include -include @srcdir@/sse2.h \
libsse2_la_CFLAGS = -I@srcdir@/../include -I.. -include @srcdir@/sse2.h \
-Wall -O2 -g -msse2 -msseregparm -mfpmath=sse -march=pentium3 \
-fno-math-errno -fno-trapping-math -ffinite-math-only \
-fno-rounding-math -fno-signaling-nans -D__NO_MATH_INLINES
......
......@@ -18,7 +18,7 @@
#define _MATH_PRIVATE_H_
#include <endian.h>
#include <sys/types.h>
#include "gstdint.h"
/* The original fdlibm code used statements like:
n0 = ((*(int*)&one)>>29)^1; * index of high word *
......@@ -41,8 +41,8 @@ typedef union
double value;
struct
{
u_int32_t msw;
u_int32_t lsw;
uint32_t msw;
uint32_t lsw;
} parts;
} ieee_double_shape_type;
......@@ -55,8 +55,8 @@ typedef union
double value;
struct
{
u_int32_t lsw;
u_int32_t msw;
uint32_t lsw;
uint32_t msw;
} parts;
} ieee_double_shape_type;
......@@ -126,7 +126,7 @@ do { \
typedef union
{
float value;
u_int32_t word;
uint32_t word;
} ieee_float_shape_type;
/* Get a 32 bit int from a float. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment