forked from mirrors/gecko-dev
Bug 1438599 - Part 1: Rebase local patches for fdlibm. r=jwalden
This commit is contained in:
parent
777d46a71e
commit
cacb9bf19b
10 changed files with 46 additions and 79 deletions
|
|
@ -1,7 +1,7 @@
|
|||
diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
||||
--- a/modules/fdlibm/src/fdlibm.h
|
||||
+++ b/modules/fdlibm/src/fdlibm.h
|
||||
@@ -12,496 +12,50 @@
|
||||
@@ -12,499 +12,50 @@
|
||||
/*
|
||||
* from: @(#)fdlibm.h 5.1 93/09/24
|
||||
* $FreeBSD$
|
||||
|
|
@ -245,12 +245,12 @@ diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
|||
double sqrt(double);
|
||||
+double fabs(double);
|
||||
|
||||
+double floor(double);
|
||||
+double trunc(double);
|
||||
double ceil(double);
|
||||
-double ceil(double);
|
||||
-double fabs(double) __pure2;
|
||||
-double floor(double);
|
||||
double floor(double);
|
||||
-double fmod(double, double);
|
||||
+double trunc(double);
|
||||
+double ceil(double);
|
||||
|
||||
-/*
|
||||
- * These functions are not in C90.
|
||||
|
|
@ -368,13 +368,13 @@ diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
|||
float floorf(float);
|
||||
-float fmodf(float, float);
|
||||
-float roundf(float);
|
||||
|
||||
-
|
||||
-float erff(float);
|
||||
-float erfcf(float);
|
||||
-float hypotf(float, float);
|
||||
-float lgammaf(float);
|
||||
-float tgammaf(float);
|
||||
-
|
||||
|
||||
-float acoshf(float);
|
||||
-float asinhf(float);
|
||||
-float atanhf(float);
|
||||
|
|
@ -497,6 +497,9 @@ diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
|||
-
|
||||
-#if __BSD_VISIBLE
|
||||
-long double lgammal_r(long double, int *);
|
||||
-void sincos(double, double *, double *);
|
||||
-void sincosf(float, float *, float *);
|
||||
-void sincosl(long double, long double *, long double *);
|
||||
-#endif
|
||||
-
|
||||
-__END_DECLS
|
||||
|
|
|
|||
|
|
@ -235,9 +235,9 @@ diff --git a/modules/fdlibm/src/e_pow.cpp b/modules/fdlibm/src/e_pow.cpp
|
|||
@@ -52,17 +52,16 @@
|
||||
*
|
||||
* Constants :
|
||||
* The hexadecimal values are the intended ones for the following
|
||||
* constants. The decimal values may be used, provided that the
|
||||
* compiler will convert from decimal to binary accurately enough
|
||||
* The hexadecimal values are the intended ones for the following
|
||||
* constants. The decimal values may be used, provided that the
|
||||
* compiler will convert from decimal to binary accurately enough
|
||||
* to produce the hexadecimal values shown.
|
||||
*/
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ diff --git a/modules/fdlibm/src/e_sqrt.cpp b/modules/fdlibm/src/e_sqrt.cpp
|
|||
diff --git a/modules/fdlibm/src/k_exp.cpp b/modules/fdlibm/src/k_exp.cpp
|
||||
--- a/modules/fdlibm/src/k_exp.cpp
|
||||
+++ b/modules/fdlibm/src/k_exp.cpp
|
||||
@@ -24,17 +24,16 @@
|
||||
@@ -26,17 +26,16 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
|
@ -485,10 +485,10 @@ diff --git a/modules/fdlibm/src/s_expm1.cpp b/modules/fdlibm/src/s_expm1.cpp
|
|||
diff --git a/modules/fdlibm/src/s_fabs.cpp b/modules/fdlibm/src/s_fabs.cpp
|
||||
--- a/modules/fdlibm/src/s_fabs.cpp
|
||||
+++ b/modules/fdlibm/src/s_fabs.cpp
|
||||
@@ -13,17 +13,16 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$FreeBSD$";
|
||||
#endif
|
||||
@@ -12,17 +12,16 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* fabs(x) returns the absolute value of x.
|
||||
|
|
@ -569,7 +569,7 @@ diff --git a/modules/fdlibm/src/s_log1p.cpp b/modules/fdlibm/src/s_log1p.cpp
|
|||
diff --git a/modules/fdlibm/src/s_nearbyint.cpp b/modules/fdlibm/src/s_nearbyint.cpp
|
||||
--- a/modules/fdlibm/src/s_nearbyint.cpp
|
||||
+++ b/modules/fdlibm/src/s_nearbyint.cpp
|
||||
@@ -23,17 +23,17 @@
|
||||
@@ -25,17 +25,17 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
|
@ -633,13 +633,13 @@ diff --git a/modules/fdlibm/src/s_rintf.cpp b/modules/fdlibm/src/s_rintf.cpp
|
|||
diff --git a/modules/fdlibm/src/s_scalbn.cpp b/modules/fdlibm/src/s_scalbn.cpp
|
||||
--- a/modules/fdlibm/src/s_scalbn.cpp
|
||||
+++ b/modules/fdlibm/src/s_scalbn.cpp
|
||||
@@ -19,17 +19,16 @@ static char rcsid[] = "$FreeBSD$";
|
||||
@@ -17,17 +17,16 @@
|
||||
* scalbn (double x, int n)
|
||||
* scalbn(x,n) returns x* 2**n computed by exponent
|
||||
* manipulation rather than by actually performing an
|
||||
* exponentiation or a multiplication.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <float.h>
|
||||
|
||||
-#include "math.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h
|
||||
--- a/modules/fdlibm/src/math_private.h
|
||||
+++ b/modules/fdlibm/src/math_private.h
|
||||
@@ -724,16 +724,51 @@ irintl(long double x)
|
||||
@@ -736,16 +736,51 @@ irintl(long double x)
|
||||
#define __ieee754_j1f j1f
|
||||
#define __ieee754_y0f y0f
|
||||
#define __ieee754_y1f y1f
|
||||
|
|
|
|||
|
|
@ -346,10 +346,10 @@ diff --git a/modules/fdlibm/src/s_scalbn.cpp b/modules/fdlibm/src/s_scalbn.cpp
|
|||
--- a/modules/fdlibm/src/s_scalbn.cpp
|
||||
+++ b/modules/fdlibm/src/s_scalbn.cpp
|
||||
@@ -53,13 +53,8 @@ scalbn (double x, int n)
|
||||
if (k <= -54)
|
||||
if (n > 50000) /* in case integer overflow in n+k */
|
||||
return huge*copysign(huge,x); /*overflow*/
|
||||
else return tiny*copysign(tiny,x); /*underflow*/
|
||||
else
|
||||
return tiny*copysign(tiny,x); /*underflow*/
|
||||
}
|
||||
k += 54; /* subnormal result */
|
||||
SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20));
|
||||
return x*twom54;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ diff --git a/modules/fdlibm/src/e_asin.cpp b/modules/fdlibm/src/e_asin.cpp
|
|||
*
|
||||
* Developed at SunSoft, 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.
|
||||
* ====================================================
|
||||
*/
|
||||
|
|
@ -284,7 +284,7 @@ diff --git a/modules/fdlibm/src/e_pow.cpp b/modules/fdlibm/src/e_pow.cpp
|
|||
* Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
* ====================================================
|
||||
*/
|
||||
|
|
@ -352,7 +352,7 @@ diff --git a/modules/fdlibm/src/e_sqrt.cpp b/modules/fdlibm/src/e_sqrt.cpp
|
|||
diff --git a/modules/fdlibm/src/k_exp.cpp b/modules/fdlibm/src/k_exp.cpp
|
||||
--- a/modules/fdlibm/src/k_exp.cpp
|
||||
+++ b/modules/fdlibm/src/k_exp.cpp
|
||||
@@ -19,22 +19,22 @@
|
||||
@@ -21,22 +21,22 @@
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
|
|
@ -573,12 +573,7 @@ diff --git a/modules/fdlibm/src/s_expm1.cpp b/modules/fdlibm/src/s_expm1.cpp
|
|||
diff --git a/modules/fdlibm/src/s_fabs.cpp b/modules/fdlibm/src/s_fabs.cpp
|
||||
--- a/modules/fdlibm/src/s_fabs.cpp
|
||||
+++ b/modules/fdlibm/src/s_fabs.cpp
|
||||
@@ -1,22 +1,22 @@
|
||||
-/* @(#)s_fabs.c 5.1 93/09/24 */
|
||||
+ /* @(#)s_fabs.c 5.1 93/09/24 */
|
||||
/*
|
||||
* ====================================================
|
||||
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
||||
@@ -5,18 +5,18 @@
|
||||
*
|
||||
* Developed at SunPro, a Sun Microsystems, Inc. business.
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
|
|
@ -587,10 +582,10 @@ diff --git a/modules/fdlibm/src/s_fabs.cpp b/modules/fdlibm/src/s_fabs.cpp
|
|||
* ====================================================
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
-static char rcsid[] = "$FreeBSD$";
|
||||
+ //static char rcsid[] = "$FreeBSD$";
|
||||
#endif
|
||||
-#include <sys/cdefs.h>
|
||||
-__FBSDID("$FreeBSD$");
|
||||
+//#include <sys/cdefs.h>
|
||||
+//__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* fabs(x) returns the absolute value of x.
|
||||
|
|
@ -598,6 +593,7 @@ diff --git a/modules/fdlibm/src/s_fabs.cpp b/modules/fdlibm/src/s_fabs.cpp
|
|||
|
||||
#include "math_private.h"
|
||||
|
||||
double
|
||||
diff --git a/modules/fdlibm/src/s_floor.cpp b/modules/fdlibm/src/s_floor.cpp
|
||||
--- a/modules/fdlibm/src/s_floor.cpp
|
||||
+++ b/modules/fdlibm/src/s_floor.cpp
|
||||
|
|
@ -673,7 +669,7 @@ diff --git a/modules/fdlibm/src/s_log1p.cpp b/modules/fdlibm/src/s_log1p.cpp
|
|||
diff --git a/modules/fdlibm/src/s_nearbyint.cpp b/modules/fdlibm/src/s_nearbyint.cpp
|
||||
--- a/modules/fdlibm/src/s_nearbyint.cpp
|
||||
+++ b/modules/fdlibm/src/s_nearbyint.cpp
|
||||
@@ -19,18 +19,18 @@
|
||||
@@ -21,18 +21,18 @@
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
|
|
@ -745,7 +741,8 @@ diff --git a/modules/fdlibm/src/s_rintf.cpp b/modules/fdlibm/src/s_rintf.cpp
|
|||
diff --git a/modules/fdlibm/src/s_scalbn.cpp b/modules/fdlibm/src/s_scalbn.cpp
|
||||
--- a/modules/fdlibm/src/s_scalbn.cpp
|
||||
+++ b/modules/fdlibm/src/s_scalbn.cpp
|
||||
@@ -6,27 +6,27 @@
|
||||
@@ -5,18 +5,18 @@
|
||||
*
|
||||
* Developed at SunPro, a Sun Microsystems, Inc. business.
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software is freely granted, provided that this notice
|
||||
|
|
@ -753,10 +750,10 @@ diff --git a/modules/fdlibm/src/s_scalbn.cpp b/modules/fdlibm/src/s_scalbn.cpp
|
|||
* ====================================================
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
-static char rcsid[] = "$FreeBSD$";
|
||||
+//static char rcsid[] = "$FreeBSD$";
|
||||
#endif
|
||||
-#include <sys/cdefs.h>
|
||||
-__FBSDID("$FreeBSD$");
|
||||
+//#include <sys/cdefs.h>
|
||||
+//__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* scalbn (double x, int n)
|
||||
|
|
@ -765,16 +762,6 @@ diff --git a/modules/fdlibm/src/s_scalbn.cpp b/modules/fdlibm/src/s_scalbn.cpp
|
|||
* exponentiation or a multiplication.
|
||||
*/
|
||||
|
||||
-#include <sys/cdefs.h>
|
||||
+//#include <sys/cdefs.h>
|
||||
#include <float.h>
|
||||
|
||||
#include "math_private.h"
|
||||
|
||||
static const double
|
||||
two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
|
||||
twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */
|
||||
huge = 1.0e+300,
|
||||
diff --git a/modules/fdlibm/src/s_tanh.cpp b/modules/fdlibm/src/s_tanh.cpp
|
||||
--- a/modules/fdlibm/src/s_tanh.cpp
|
||||
+++ b/modules/fdlibm/src/s_tanh.cpp
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
diff --git a/modules/fdlibm/src/k_exp.cpp b/modules/fdlibm/src/k_exp.cpp
|
||||
--- a/modules/fdlibm/src/k_exp.cpp
|
||||
+++ b/modules/fdlibm/src/k_exp.cpp
|
||||
@@ -22,18 +22,16 @@
|
||||
@@ -24,18 +24,16 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
|
|
@ -20,7 +20,7 @@ diff --git a/modules/fdlibm/src/k_exp.cpp b/modules/fdlibm/src/k_exp.cpp
|
|||
/*
|
||||
* Compute exp(x), scaled to avoid spurious overflow. An exponent is
|
||||
* returned separately in 'expt'.
|
||||
@@ -76,32 +74,8 @@ double
|
||||
@@ -78,32 +76,8 @@ double
|
||||
double exp_x, scale;
|
||||
int ex_expt;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h
|
||||
--- a/modules/fdlibm/src/math_private.h
|
||||
+++ b/modules/fdlibm/src/math_private.h
|
||||
@@ -285,16 +285,27 @@ do { \
|
||||
@@ -287,16 +287,27 @@ do { \
|
||||
if (sizeof(type) >= sizeof(long double)) \
|
||||
(lval) = (rval); \
|
||||
else { \
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
diff --git a/modules/fdlibm/src/s_nearbyint.cpp b/modules/fdlibm/src/s_nearbyint.cpp
|
||||
--- a/modules/fdlibm/src/s_nearbyint.cpp
|
||||
+++ b/modules/fdlibm/src/s_nearbyint.cpp
|
||||
@@ -51,9 +51,8 @@ fn(type x) \
|
||||
@@ -53,9 +53,8 @@ fn(type x) \
|
||||
fegetenv(&env); \
|
||||
ret = rint(x); \
|
||||
fesetenv(&env); \
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h
|
||||
--- a/modules/fdlibm/src/math_private.h
|
||||
+++ b/modules/fdlibm/src/math_private.h
|
||||
@@ -271,17 +271,17 @@ do { \
|
||||
@@ -273,17 +273,17 @@ do { \
|
||||
/* The above works on non-i386 too, but we use this to check v. */
|
||||
#define LD80C(m, ex, v) { .e = (v), }
|
||||
#endif
|
||||
|
|
@ -20,4 +20,3 @@ diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private
|
|||
if (sizeof(type) >= sizeof(long double)) \
|
||||
(lval) = (rval); \
|
||||
else { \
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
diff --git a/modules/fdlibm/src/e_atan2.cpp b/modules/fdlibm/src/e_atan2.cpp
|
||||
--- a/modules/fdlibm/src/e_atan2.cpp
|
||||
+++ b/modules/fdlibm/src/e_atan2.cpp
|
||||
@@ -65,17 +65,17 @@ double
|
||||
|
||||
EXTRACT_WORDS(hx,lx,x);
|
||||
ix = hx&0x7fffffff;
|
||||
EXTRACT_WORDS(hy,ly,y);
|
||||
iy = hy&0x7fffffff;
|
||||
if(((ix|((lx|-lx)>>31))>0x7ff00000)||
|
||||
((iy|((ly|-ly)>>31))>0x7ff00000)) /* x or y is NaN */
|
||||
return x+y;
|
||||
- if((hx-0x3ff00000|lx)==0) return atan(y); /* x=1.0 */
|
||||
+ if(hx==0x3ff00000&&lx==0) return atan(y); /* x=1.0 */
|
||||
m = ((hy>>31)&1)|((hx>>30)&2); /* 2*sign(x)+sign(y) */
|
||||
|
||||
/* when y = 0 */
|
||||
if((iy|ly)==0) {
|
||||
switch(m) {
|
||||
case 0:
|
||||
case 1: return y; /* atan(+-0,+anything)=+-0 */
|
||||
case 2: return pi+tiny;/* atan(+0,-anything) = pi */
|
||||
Loading…
Reference in a new issue