Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 745218 Details for
Bug 816975
>=www-client/firefox-91.0 fails to build on x86
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix for math_private.h build issue on x86
firefox-93.0_x86_math_private.patch (text/plain), 2.72 KB, created by
acmondor
on 2021-10-16 20:54:33 UTC
(
hide
)
Description:
fix for math_private.h build issue on x86
Filename:
MIME Type:
Creator:
acmondor
Created:
2021-10-16 20:54:33 UTC
Size:
2.72 KB
patch
obsolete
>diff -w -ruN firefox-93.0.org/modules/fdlibm/src/math_private.h firefox-93.0/modules/fdlibm/src/math_private.h >--- firefox-93.0.org/modules/fdlibm/src/math_private.h 2021-09-27 16:47:42.000000000 -0600 >+++ firefox-93.0/modules/fdlibm/src/math_private.h 2021-10-16 11:08:55.154643922 -0600 >@@ -30,9 +30,13 @@ > * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t > */ > >+#ifdef __LP64__ > typedef double __double_t; >+#else >+typedef long double __double_t; >+#endif > typedef __double_t double_t; >- >+typedef float __float_t; > /* > * The original fdlibm code used statements like: > * n0 = ((*(int*)&one)>>29)^1; * index of high word * >@@ -630,6 +634,41 @@ > return ((double)(x + 0x1.8p52) - 0x1.8p52); > } > >+static inline float >+rnintf(__float_t x) >+{ >+ /* >+ * As for rnint(), except we could just call that to handle the >+ * extra precision case, usually without losing efficiency. >+ */ >+ return ((float)(x + 0x1.8p23F) - 0x1.8p23F); >+} >+ >+#ifdef LDBL_MANT_DIG >+/* >+ * The complications for extra precision are smaller for rnintl() since it >+ * can safely assume that the rounding precision has been increased from >+ * its default to FP_PE on x86. We don't exploit that here to get small >+ * optimizations from limiting the rangle to double. We just need it for >+ * the magic number to work with long doubles. ld128 callers should use >+ * rnint() instead of this if possible. ld80 callers should prefer >+ * rnintl() since for amd64 this avoids swapping the register set, while >+ * for i386 it makes no difference (assuming FP_PE), and for other arches >+ * it makes little difference. >+ */ >+static inline long double >+rnintl(long double x) >+{ >+#if (LDBL_MANT_DIG == 64) >+ return (x + __CONCAT(0x1.8p, 64) / 2 - >+ __CONCAT(0x1.8p, 64) / 2); >+#else >+ return (x + __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2 - >+ __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2); >+#endif >+} >+#endif /* LDBL_MANT_DIG */ >+ > /* > * irint() and i64rint() give the same result as casting to their integer > * return type provided their arg is a floating point integer. They can >@@ -646,6 +685,39 @@ > #define irint(x) ((int)(x)) > #endif > >+#define i64rint(x) ((int64_t)(x)) /* only needed for ld128 so not opt. */ >+ >+#if defined(__i386__) && defined(__GNUCLIKE_ASM) >+static __inline int >+irintf(float x) >+{ >+ int n; >+ >+ __asm("fistl %0" : "=m" (n) : "t" (x)); >+ return (n); >+} >+ >+static __inline int >+irintd(double x) >+{ >+ int n; >+ >+ __asm("fistl %0" : "=m" (n) : "t" (x)); >+ return (n); >+} >+#endif >+ >+#if (defined(__amd64__) || defined(__i386__)) && defined(__GNUCLIKE_ASM) >+static __inline int >+irintl(long double x) >+{ >+ int n; >+ >+ __asm("fistl %0" : "=m" (n) : "t" (x)); >+ return (n); >+} >+#endif >+ > #ifdef DEBUG > #if defined(__amd64__) || defined(__i386__) > #define breakpoint() asm("int $3")
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 816975
:
743844
|
743847
|
744135
|
744138
| 745218 |
762097
|
762098
|
762099