Fix for gcc opt bug described in bug 24892. JSRef build fix only, mozilla build still needs some lovin'.

r=rogerl
This commit is contained in:
rginda%netscape.com 2000-01-27 00:01:29 +00:00
Родитель 69b926da10
Коммит e704417b3b
5 изменённых файлов: 45 добавлений и 6 удалений

Просмотреть файл

@ -50,6 +50,18 @@ CPU_ARCH = $(shell uname -m)
ifeq (86,$(findstring 86,$(CPU_ARCH)))
CPU_ARCH = x86
OS_CFLAGS+= -DX86_LINUX
ifeq (gcc, $(CC))
# if using gcc on x86, check version for opt bug
# (http://bugzilla.mozilla.org/show_bug.cgi?id=24892)
GCC_VERSION := $(shell gcc -v 2>&1 | grep version | awk '{ print $$3 }')
GCC_LIST:=$(sort 2.91.66 $(GCC_VERSION) )
ifeq (2.91.66, $(firstword $(GCC_LIST)))
CFLAGS+= -DGCC_OPT_BUG
endif
endif
endif
GFX_ARCH = x
@ -57,6 +69,7 @@ OS_LIBS = -lm -lc
ASFLAGS += -x assembler-with-cpp
ifeq ($(CPU_ARCH),alpha)
# Ask the C compiler on alpha linux to let us work with denormalized

Просмотреть файл

@ -97,7 +97,12 @@ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
double x;
#endif
{
double z,p,q,r,w,s,c,df;
#ifdef GCC_OPT_BUG
volatile double df;
#else
double df;
#endif
double z,p,q,r,w,s,c;
int hx,ix;
hx = __HI(x);
ix = hx&0x7fffffff;

Просмотреть файл

@ -106,7 +106,12 @@ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
double x;
#endif
{
double t,w,p,q,c,r,s;
#ifdef GCC_OPT_BUG
volatile double w;
#else
double w;
#endif
double t,p,q,c,r,s;
int hx,ix;
hx = __HI(x);
ix = hx&0x7fffffff;

Просмотреть файл

@ -139,8 +139,13 @@ P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
double x;
#endif
{
#ifdef GCC_OPT_BUG
volatile int xsb;
#else
int xsb;
#endif
double y,hi,lo,c,t;
int k,xsb;
int k;
unsigned hx;
hx = __HI(x); /* high word of x */

Просмотреть файл

@ -135,8 +135,13 @@ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
double x, y;
#endif
{
double z,ax,z_h,z_l,p_h,p_l;
double y1,t1,t2,r,s,t,u,v,w;
#ifdef GCC_OPT_BUG
volatile double y1,t1,p_h,t,z,ax;
#else
double y1,t1,p_h,t,z,ax;
#endif
double z_h,z_l,p_l;
double t2,r,s,u,v,w;
int i,j,k,yisint,n;
int hx,hy,ix,iy;
unsigned lx,ly;
@ -236,7 +241,12 @@ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
__LO(t1) = 0;
t2 = v-(t1-u);
} else {
double s2,s_h,s_l,t_h,t_l;
#ifdef GCC_OPT_BUG
volatile double s_h,t_h;
#else
double s_h,t_h;
#endif
double s2,s_l,t_l;
n = 0;
/* take care subnormal number */
if(ix<0x00100000)
@ -296,6 +306,7 @@ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
z = p_l+p_h;
j = __HI(z);
i = __LO(z);
if (j>=0x40900000) { /* z >= 1024 */
if(((j-0x40900000)|i)!=0) /* if z > 1024 */
return s*really_big*really_big; /* overflow */