зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1303085: updates meta-patches after adding rint/rintf/nearbyint/nearbyintf; r=arai
MozReview-Commit-ID: LLDpA6SplXi --HG-- extra : rebase_source : 2c3450a39832ef71144cb212c3aa04ed66da7f79 extra : histedit_source : 61089440a402dced2d4bbfc41599ea751eec1abb
This commit is contained in:
Родитель
38920d4ca6
Коммит
92f99e505e
|
@ -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,46 @@
|
||||
@@ -12,496 +12,50 @@
|
||||
/*
|
||||
* from: @(#)fdlibm.h 5.1 93/09/24
|
||||
* $FreeBSD$
|
||||
|
@ -279,9 +279,9 @@ diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
|||
-double nextafter(double, double);
|
||||
-double remainder(double, double);
|
||||
-double remquo(double, double, int *);
|
||||
-double rint(double);
|
||||
double rint(double);
|
||||
-#endif /* __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE */
|
||||
|
||||
-
|
||||
-#if __BSD_VISIBLE || __XSI_VISIBLE
|
||||
-double j0(double);
|
||||
-double j1(double);
|
||||
|
@ -289,9 +289,7 @@ diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
|||
-double y0(double);
|
||||
-double y1(double);
|
||||
-double yn(int, double);
|
||||
+double copysign(double, double);
|
||||
+double scalbn(double, int);
|
||||
|
||||
-
|
||||
-#if __XSI_VISIBLE <= 500 || __BSD_VISIBLE
|
||||
-double gamma(double);
|
||||
-#endif
|
||||
|
@ -306,10 +304,11 @@ diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
|||
-double fdim(double, double);
|
||||
-double fmax(double, double) __pure2;
|
||||
-double fmin(double, double) __pure2;
|
||||
-double nearbyint(double);
|
||||
+double copysign(double, double);
|
||||
double nearbyint(double);
|
||||
-double round(double);
|
||||
-double scalbln(double, long);
|
||||
-double scalbn(double, int);
|
||||
double scalbn(double, int);
|
||||
-double tgamma(double);
|
||||
-double trunc(double);
|
||||
-#endif
|
||||
|
@ -363,15 +362,13 @@ diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
|||
-
|
||||
-float powf(float, float);
|
||||
-float sqrtf(float);
|
||||
-
|
||||
+float floorf(float);
|
||||
+float truncf(float);
|
||||
|
||||
float ceilf(float);
|
||||
-float fabsf(float) __pure2;
|
||||
-float floorf(float);
|
||||
float floorf(float);
|
||||
-float fmodf(float, float);
|
||||
-float roundf(float);
|
||||
-
|
||||
|
||||
-float erff(float);
|
||||
-float erfcf(float);
|
||||
-float hypotf(float, float);
|
||||
|
@ -389,15 +386,15 @@ diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
|||
-long lrintf(float);
|
||||
-long lroundf(float);
|
||||
-float nanf(const char *) __pure2;
|
||||
-float nearbyintf(float);
|
||||
float nearbyintf(float);
|
||||
-float nextafterf(float, float);
|
||||
-float remainderf(float, float);
|
||||
-float remquof(float, float, int *);
|
||||
-float rintf(float);
|
||||
float rintf(float);
|
||||
-float scalblnf(float, long);
|
||||
-float scalbnf(float, int);
|
||||
-float truncf(float);
|
||||
-
|
||||
float truncf(float);
|
||||
|
||||
-float fdimf(float, float);
|
||||
-float fmaf(float, float, float);
|
||||
-float fmaxf(float, float) __pure2;
|
||||
|
@ -461,7 +458,7 @@ diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
|||
-long double fmaxl(long double, long double) __pure2;
|
||||
-long double fminl(long double, long double) __pure2;
|
||||
-long double fmodl(long double, long double);
|
||||
-long double frexpl(long double value, int *); /* fundamentally !__pure2 */
|
||||
-long double frexpl(long double, int *); /* fundamentally !__pure2 */
|
||||
-long double hypotl(long double, long double);
|
||||
-int ilogbl(long double) __pure2;
|
||||
-long double ldexpl(long double, int);
|
||||
|
@ -503,5 +500,5 @@ diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
|||
-#endif
|
||||
-
|
||||
-__END_DECLS
|
||||
|
||||
-
|
||||
#endif /* !_MATH_H_ */
|
||||
|
|
|
@ -22,14 +22,14 @@ diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
|||
|
||||
double cosh(double);
|
||||
double sinh(double);
|
||||
@@ -49,9 +49,9 @@ double log2(double);
|
||||
@@ -53,9 +53,9 @@ double scalbn(double, int);
|
||||
|
||||
double copysign(double, double);
|
||||
double scalbn(double, int);
|
||||
|
||||
float floorf(float);
|
||||
float truncf(float);
|
||||
float ceilf(float);
|
||||
float floorf(float);
|
||||
|
||||
float nearbyintf(float);
|
||||
float rintf(float);
|
||||
float truncf(float);
|
||||
|
||||
-#endif /* !_MATH_H_ */
|
||||
+#endif /* mozilla_imported_fdlibm_h */
|
||||
|
|
|
@ -20,14 +20,14 @@ diff --git a/modules/fdlibm/src/fdlibm.h b/modules/fdlibm/src/fdlibm.h
|
|||
double cosh(double);
|
||||
double sinh(double);
|
||||
double tanh(double);
|
||||
@@ -49,9 +51,11 @@ double log2(double);
|
||||
@@ -53,9 +55,11 @@ double scalbn(double, int);
|
||||
|
||||
double copysign(double, double);
|
||||
double scalbn(double, int);
|
||||
|
||||
float floorf(float);
|
||||
float truncf(float);
|
||||
float ceilf(float);
|
||||
float floorf(float);
|
||||
|
||||
float nearbyintf(float);
|
||||
float rintf(float);
|
||||
float truncf(float);
|
||||
|
||||
+} /* namespace fdlibm */
|
||||
+
|
||||
|
|
|
@ -566,6 +566,70 @@ diff --git a/modules/fdlibm/src/s_log1p.cpp b/modules/fdlibm/src/s_log1p.cpp
|
|||
two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */
|
||||
Lp1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */
|
||||
Lp2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */
|
||||
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 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <fenv.h>
|
||||
-#include <math.h>
|
||||
+#include "math_private.h"
|
||||
|
||||
/*
|
||||
* We save and restore the floating-point environment to avoid raising
|
||||
* an inexact exception. We can get away with using fesetenv()
|
||||
* instead of feclearexcept()/feupdateenv() to restore the environment
|
||||
* because the only exception defined for rint() is overflow, and
|
||||
* rounding can't overflow as long as emax >= p.
|
||||
*
|
||||
diff --git a/modules/fdlibm/src/s_rint.cpp b/modules/fdlibm/src/s_rint.cpp
|
||||
--- a/modules/fdlibm/src/s_rint.cpp
|
||||
+++ b/modules/fdlibm/src/s_rint.cpp
|
||||
@@ -20,17 +20,16 @@
|
||||
* Method:
|
||||
* Using floating addition.
|
||||
* Exception:
|
||||
* Inexact flag raised if x not equal to rint(x).
|
||||
*/
|
||||
|
||||
#include <float.h>
|
||||
|
||||
-#include "math.h"
|
||||
#include "math_private.h"
|
||||
|
||||
static const double
|
||||
TWO52[2]={
|
||||
4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */
|
||||
-4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */
|
||||
};
|
||||
|
||||
diff --git a/modules/fdlibm/src/s_rintf.cpp b/modules/fdlibm/src/s_rintf.cpp
|
||||
--- a/modules/fdlibm/src/s_rintf.cpp
|
||||
+++ b/modules/fdlibm/src/s_rintf.cpp
|
||||
@@ -14,17 +14,16 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <float.h>
|
||||
#include <stdint.h>
|
||||
|
||||
-#include "math.h"
|
||||
#include "math_private.h"
|
||||
|
||||
static const float
|
||||
TWO23[2]={
|
||||
8.3886080000e+06, /* 0x4b000000 */
|
||||
-8.3886080000e+06, /* 0xcb000000 */
|
||||
};
|
||||
|
||||
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
|
||||
|
|
|
@ -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,47 @@ irintl(long double x)
|
||||
@@ -724,16 +724,51 @@ irintl(long double x)
|
||||
#define __ieee754_j1f j1f
|
||||
#define __ieee754_y0f y0f
|
||||
#define __ieee754_y1f y1f
|
||||
|
@ -40,6 +40,10 @@ diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private
|
|||
+#define trunc fdlibm::trunc
|
||||
+#define truncf fdlibm::truncf
|
||||
+#define floorf fdlibm::floorf
|
||||
+#define nearbyint fdlibm::nearbyint
|
||||
+#define nearbyintf fdlibm::nearbyintf
|
||||
+#define rint fdlibm::rint
|
||||
+#define rintf fdlibm::rintf
|
||||
+
|
||||
/* fdlibm kernel function */
|
||||
int __kernel_rem_pio2(double*,double*,int,int,int);
|
||||
|
|
|
@ -326,6 +326,22 @@ diff --git a/modules/fdlibm/src/s_log1p.cpp b/modules/fdlibm/src/s_log1p.cpp
|
|||
-#if (LDBL_MANT_DIG == 53)
|
||||
-__weak_reference(log1p, log1pl);
|
||||
-#endif
|
||||
diff --git a/modules/fdlibm/src/s_rint.cpp b/modules/fdlibm/src/s_rint.cpp
|
||||
--- a/modules/fdlibm/src/s_rint.cpp
|
||||
+++ b/modules/fdlibm/src/s_rint.cpp
|
||||
@@ -80,12 +80,8 @@ rint(double x)
|
||||
if((i1&i)==0) return x; /* x is integral */
|
||||
i>>=1;
|
||||
if((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(j0-20));
|
||||
}
|
||||
INSERT_WORDS(x,i0,i1);
|
||||
STRICT_ASSIGN(double,w,TWO52[sx]+x);
|
||||
return w-TWO52[sx];
|
||||
}
|
||||
-
|
||||
-#if (LDBL_MANT_DIG == 53)
|
||||
-__weak_reference(rint, rintl);
|
||||
-#endif
|
||||
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
|
||||
|
|
|
@ -670,6 +670,78 @@ diff --git a/modules/fdlibm/src/s_log1p.cpp b/modules/fdlibm/src/s_log1p.cpp
|
|||
* 1+x = 2^k * (1+f),
|
||||
* where sqrt(2)/2 < 1+f < sqrt(2) .
|
||||
*
|
||||
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 @@
|
||||
* 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
|
||||
* 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.
|
||||
*/
|
||||
|
||||
-#include <sys/cdefs.h>
|
||||
-__FBSDID("$FreeBSD$");
|
||||
+//#include <sys/cdefs.h>
|
||||
+//__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <fenv.h>
|
||||
#include "math_private.h"
|
||||
|
||||
/*
|
||||
* We save and restore the floating-point environment to avoid raising
|
||||
* an inexact exception. We can get away with using fesetenv()
|
||||
* instead of feclearexcept()/feupdateenv() to restore the environment
|
||||
diff --git a/modules/fdlibm/src/s_rint.cpp b/modules/fdlibm/src/s_rint.cpp
|
||||
--- a/modules/fdlibm/src/s_rint.cpp
|
||||
+++ b/modules/fdlibm/src/s_rint.cpp
|
||||
@@ -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
|
||||
* is preserved.
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
-#include <sys/cdefs.h>
|
||||
-__FBSDID("$FreeBSD$");
|
||||
+//#include <sys/cdefs.h>
|
||||
+//__FBSDID("$FreeBSD$");
|
||||
|
||||
/*
|
||||
* rint(x)
|
||||
* Return x rounded to integral value according to the prevailing
|
||||
* rounding mode.
|
||||
* Method:
|
||||
* Using floating addition.
|
||||
* Exception:
|
||||
diff --git a/modules/fdlibm/src/s_rintf.cpp b/modules/fdlibm/src/s_rintf.cpp
|
||||
--- a/modules/fdlibm/src/s_rintf.cpp
|
||||
+++ b/modules/fdlibm/src/s_rintf.cpp
|
||||
@@ -8,18 +8,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
|
||||
* is preserved.
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
-#include <sys/cdefs.h>
|
||||
-__FBSDID("$FreeBSD$");
|
||||
+//#include <sys/cdefs.h>
|
||||
+//__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <float.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "math_private.h"
|
||||
|
||||
static const float
|
||||
TWO23[2]={
|
||||
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
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
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) \
|
||||
fegetenv(&env); \
|
||||
ret = rint(x); \
|
||||
fesetenv(&env); \
|
||||
return (ret); \
|
||||
}
|
||||
|
||||
DECL(double, nearbyint, rint)
|
||||
DECL(float, nearbyintf, rintf)
|
||||
-DECL(long double, nearbyintl, rintl)
|
Загрузка…
Ссылка в новой задаче