diff options
author | Michael Koch <konqueror@gmx.de> | 2004-05-21 07:03:48 +0000 |
---|---|---|
committer | Michael Koch <konqueror@gmx.de> | 2004-05-21 07:03:48 +0000 |
commit | cb31b41f9698c998acd65b61050bc374d74b3fec (patch) | |
tree | bb32c04035ddb3d37a296bd72a7ea7b019006e78 /native | |
parent | 2fd93df7925414f723bf2874f311c68f6642dabf (diff) | |
download | classpath-cb31b41f9698c998acd65b61050bc374d74b3fec.tar.gz |
2004-05-21 Mark Wielaard <mark@klomp.org>
* native/fdlibm/e_pow.c: CYGNUS LOCAL should be GCJ LOCAL.
* native/fdlibm/fdlibm.h: Likewise.
2004-05-21 Richard Henderson <rth@redhat.com>
* native/fdlibm/mprec.c (lo0bits): Fix paren typo.
2004-05-21 Matt Kraai <kraai@alumni.cmu.edu>
* native/fdlibm/w_exp.c (o_threshold, u_threshold): Define only
if _IEEE_LIBM is undefined.
2004-05-21 Bo Thorsen <bo@berlioz.suse.de>
* native/fdlibm/ieeefp.h: Add x86-64 support.
2004-05-21 Gerhard Tonn <GerhardTonn@swol.de>
* native/fdlibm/ieeefp.h: Define __IEEE_BIG_ENDIAN for S/390.
2004-05-21 Anthony Green <green@redhat.com>
* native/fdlibm/ieeefp.h: Add arm thumb support.
2004-05-21 Richard Earnshaw <rearnsha@arm.com>
* native/fdlibm/ieeefp.h: Handle ARM platforms that have pure-endian
floating point.
2002-1-1 Andrew Pinski <pinskia@physics.uc.edu>
* native/fdlibm/ieeefp.h: Define __IEEE_BIG_ENDIAN for
PPC Darwin, not for all of Darwin.
Diffstat (limited to 'native')
-rw-r--r-- | native/fdlibm/e_pow.c | 2 | ||||
-rw-r--r-- | native/fdlibm/fdlibm.h | 2 | ||||
-rw-r--r-- | native/fdlibm/ieeefp.h | 37 | ||||
-rw-r--r-- | native/fdlibm/mprec.c | 2 | ||||
-rw-r--r-- | native/fdlibm/w_exp.c | 4 |
5 files changed, 34 insertions, 13 deletions
diff --git a/native/fdlibm/e_pow.c b/native/fdlibm/e_pow.c index e53a8a287..b21c0e92b 100644 --- a/native/fdlibm/e_pow.c +++ b/native/fdlibm/e_pow.c @@ -179,7 +179,7 @@ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/ } /* (x<0)**(non-int) is NaN */ - /* CYGNUS LOCAL: This used to be + /* GCJ LOCAL: This used to be if((((hx>>31)+1)|yisint)==0) return (x-x)/(x-x); but ANSI C says a right shift of a signed negative quantity is implementation defined. */ diff --git a/native/fdlibm/fdlibm.h b/native/fdlibm/fdlibm.h index 3b303e78d..156a03c1e 100644 --- a/native/fdlibm/fdlibm.h +++ b/native/fdlibm/fdlibm.h @@ -22,7 +22,7 @@ #include <config.h> #include <stdlib.h> -/* CYGNUS LOCAL: Include files. */ +/* GCJ LOCAL: Include files. */ #include "ieeefp.h" #include "mprec.h" diff --git a/native/fdlibm/ieeefp.h b/native/fdlibm/ieeefp.h index 209b8808b..397480bd9 100644 --- a/native/fdlibm/ieeefp.h +++ b/native/fdlibm/ieeefp.h @@ -8,11 +8,23 @@ #define __IEEE_LITTLE_ENDIAN #endif -#ifdef __arm__ -/* ARM always has big-endian words. Within those words the byte ordering - appears to be big or little endian. Newlib doesn't seem to care about - the byte ordering within words. */ +#if defined(__arm__) || defined(__thumb__) +/* ARM traditionally used big-endian words; and within those words the + byte ordering was big or little endian depending upon the target. + Modern floating-point formats are naturally ordered; in this case + __VFP_FP__ will be defined, even if soft-float. */ +#ifdef __VFP_FP__ +#ifdef __ARMEL__ +#define __IEEE_LITTLE_ENDIAN +#else +#define __IEEE_BIG_ENDIAN +#endif +#else #define __IEEE_BIG_ENDIAN +#ifdef __ARMEL__ +#define __IEEE_BYTES_LITTLE_ENDIAN +#endif +#endif #endif #ifdef __hppa__ @@ -59,6 +71,10 @@ #define __IEEE_LITTLE_ENDIAN #endif +#ifdef __x86_64__ +#define __IEEE_LITTLE_ENDIAN +#endif + #ifdef __i960__ #define __IEEE_LITTLE_ENDIAN #endif @@ -71,10 +87,6 @@ #define __IEEE_BIG_ENDIAN #endif -#ifdef __s390__ -#define __IEEE_BIG_ENDIAN -#endif - #ifdef __pj__ #ifdef __pjl__ #define __IEEE_LITTLE_ENDIAN @@ -103,8 +115,9 @@ #define __IEEE_LITTLE_ENDIAN #endif -#if (defined( __PPC__ ) || defined( _POWER )) -#if (defined(_BIG_ENDIAN) && _BIG_ENDIAN) || (defined(_AIX) && _AIX) +#if defined (__PPC__) || defined (__ppc__) +#if (defined(_BIG_ENDIAN) && _BIG_ENDIAN) || (defined(_AIX) && _AIX) \ + || defined (__APPLE__) #define __IEEE_BIG_ENDIAN #else #if (defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN) || (defined(__sun__) && __sun__) || (defined(__WIN32__) && __WIN32__) @@ -130,6 +143,10 @@ #endif #endif +#ifdef __s390__ +#define __IEEE_BIG_ENDIAN +#endif + #ifndef __IEEE_BIG_ENDIAN #ifndef __IEEE_LITTLE_ENDIAN #error Endianess not declared!! diff --git a/native/fdlibm/mprec.c b/native/fdlibm/mprec.c index 12dd5d261..b7ec99f35 100644 --- a/native/fdlibm/mprec.c +++ b/native/fdlibm/mprec.c @@ -296,7 +296,7 @@ _DEFUN (lo0bits, (y), unsigned long *y) { k++; x >>= 1; - if (!x & 1) + if (!(x & 1)) return 32; } *y = x; diff --git a/native/fdlibm/w_exp.c b/native/fdlibm/w_exp.c index ae792a846..45e087b45 100644 --- a/native/fdlibm/w_exp.c +++ b/native/fdlibm/w_exp.c @@ -65,6 +65,8 @@ PORTABILITY #ifndef _DOUBLE_IS_32BITS +#ifndef _IEEE_LIBM + #ifdef __STDC__ static const double #else @@ -73,6 +75,8 @@ static double o_threshold= 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */ u_threshold= -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */ +#endif + #ifdef __STDC__ double exp(double x) /* wrapper exp */ #else |