diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /modules/fdlibm/patches/08_remove_weak_reference_macro.patch | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'modules/fdlibm/patches/08_remove_weak_reference_macro.patch')
-rw-r--r-- | modules/fdlibm/patches/08_remove_weak_reference_macro.patch | 459 |
1 files changed, 459 insertions, 0 deletions
diff --git a/modules/fdlibm/patches/08_remove_weak_reference_macro.patch b/modules/fdlibm/patches/08_remove_weak_reference_macro.patch new file mode 100644 index 0000000000..338ff92b60 --- /dev/null +++ b/modules/fdlibm/patches/08_remove_weak_reference_macro.patch @@ -0,0 +1,459 @@ +diff --git a/e_acos.cpp b/e_acos.cpp +--- a/e_acos.cpp ++++ b/e_acos.cpp +@@ -99,12 +99,8 @@ __ieee754_acos(double x) + c = (z-df*df)/(s+df); + p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5))))); + q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4))); + r = p/q; + w = r*s+c; + return 2.0*(df+w); + } + } +- +-#if LDBL_MANT_DIG == 53 +-__weak_reference(acos, acosl); +-#endif +diff --git a/e_acosh.cpp b/e_acosh.cpp +--- a/e_acosh.cpp ++++ b/e_acosh.cpp +@@ -56,12 +56,8 @@ __ieee754_acosh(double x) + } else if (hx > 0x40000000) { /* 2**28 > x > 2 */ + t=x*x; + return __ieee754_log(2.0*x-one/(x+sqrt(t-one))); + } else { /* 1<x<2 */ + t = x-one; + return log1p(t+sqrt(2.0*t+t*t)); + } + } +- +-#if LDBL_MANT_DIG == 53 +-__weak_reference(acosh, acoshl); +-#endif +diff --git a/e_asin.cpp b/e_asin.cpp +--- a/e_asin.cpp ++++ b/e_asin.cpp +@@ -105,12 +105,8 @@ __ieee754_asin(double x) + c = (t-w*w)/(s+w); + r = p/q; + p = 2.0*s*r-(pio2_lo-2.0*c); + q = pio4_hi-2.0*w; + t = pio4_hi-(p-q); + } + if(hx>0) return t; else return -t; + } +- +-#if LDBL_MANT_DIG == 53 +-__weak_reference(asin, asinl); +-#endif +diff --git a/e_atan2.cpp b/e_atan2.cpp +--- a/e_atan2.cpp ++++ b/e_atan2.cpp +@@ -117,12 +117,8 @@ __ieee754_atan2(double y, double x) + switch (m) { + case 0: return z ; /* atan(+,+) */ + case 1: return -z ; /* atan(-,+) */ + case 2: return pi-(z-pi_lo);/* atan(+,-) */ + default: /* case 3 */ + return (z-pi_lo)-pi;/* atan(-,-) */ + } + } +- +-#if LDBL_MANT_DIG == 53 +-__weak_reference(atan2, atan2l); +-#endif +diff --git a/e_atanh.cpp b/e_atanh.cpp +--- a/e_atanh.cpp ++++ b/e_atanh.cpp +@@ -56,12 +56,8 @@ __ieee754_atanh(double x) + SET_HIGH_WORD(x,ix); + if(ix<0x3fe00000) { /* x < 0.5 */ + t = x+x; + t = 0.5*log1p(t+t*x/(one-x)); + } else + t = 0.5*log1p((x+x)/(one-x)); + if(hx>=0) return t; else return -t; + } +- +-#if LDBL_MANT_DIG == 53 +-__weak_reference(atanh, atanhl); +-#endif +diff --git a/e_cosh.cpp b/e_cosh.cpp +--- a/e_cosh.cpp ++++ b/e_cosh.cpp +@@ -73,12 +73,8 @@ __ieee754_cosh(double x) + + /* |x| in [log(maxdouble), overflowthresold] */ + if (ix<=0x408633CE) + return __ldexp_exp(fabs(x), -1); + + /* |x| > overflowthresold, cosh(x) overflow */ + return huge*huge; + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(cosh, coshl); +-#endif +diff --git a/e_exp.cpp b/e_exp.cpp +--- a/e_exp.cpp ++++ b/e_exp.cpp +@@ -152,12 +152,8 @@ __ieee754_exp(double x) /* default IEEE double exp */ + else y = one-((lo-(x*c)/(2.0-c))-hi); + if(k >= -1021) { + if (k==1024) return y*2.0*0x1p1023; + return y*twopk; + } else { + return y*twopk*twom1000; + } + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(exp, expl); +-#endif +diff --git a/e_hypot.cpp b/e_hypot.cpp +--- a/e_hypot.cpp ++++ b/e_hypot.cpp +@@ -117,12 +117,8 @@ __ieee754_hypot(double x, double y) + w = sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b))); + } + if(k!=0) { + t1 = 0.0; + SET_HIGH_WORD(t1,(1023+k)<<20); + return t1*w; + } else return w; + } +- +-#if LDBL_MANT_DIG == 53 +-__weak_reference(hypot, hypotl); +-#endif +diff --git a/e_log.cpp b/e_log.cpp +--- a/e_log.cpp ++++ b/e_log.cpp +@@ -135,12 +135,8 @@ __ieee754_log(double x) + hfsq=0.5*f*f; + if(k==0) return f-(hfsq-s*(hfsq+R)); else + return dk*ln2_hi-((hfsq-(s*(hfsq+R)+dk*ln2_lo))-f); + } else { + if(k==0) return f-s*(f-R); else + return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f); + } + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(log, logl); +-#endif +diff --git a/e_log10.cpp b/e_log10.cpp +--- a/e_log10.cpp ++++ b/e_log10.cpp +@@ -82,12 +82,8 @@ __ieee754_log10(double x) + * with some parallelism and it reduces the error for many args. + */ + w = y2 + val_hi; + val_lo += (y2 - w) + val_hi; + val_hi = w; + + return val_lo + val_hi; + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(log10, log10l); +-#endif +diff --git a/e_log2.cpp b/e_log2.cpp +--- a/e_log2.cpp ++++ b/e_log2.cpp +@@ -105,12 +105,8 @@ __ieee754_log2(double x) + + /* spadd(val_hi, val_lo, y), except for not using double_t: */ + w = y + val_hi; + val_lo += (y - w) + val_hi; + val_hi = w; + + return val_lo + val_hi; + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(log2, log2l); +-#endif +diff --git a/e_pow.cpp b/e_pow.cpp +--- a/e_pow.cpp ++++ b/e_pow.cpp +@@ -302,12 +302,8 @@ __ieee754_pow(double x, double y) + r = (z*t1)/(t1-two)-(w+z*w); + z = one-(r-z); + GET_HIGH_WORD(j,z); + j += (n<<20); + if((j>>20)<=0) z = scalbn(z,n); /* subnormal output */ + else SET_HIGH_WORD(z,j); + return s*z; + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(pow, powl); +-#endif +diff --git a/e_sinh.cpp b/e_sinh.cpp +--- a/e_sinh.cpp ++++ b/e_sinh.cpp +@@ -67,12 +67,8 @@ __ieee754_sinh(double x) + + /* |x| in [log(maxdouble), overflowthresold] */ + if (ix<=0x408633CE) + return h*2.0*__ldexp_exp(fabs(x), -1); + + /* |x| > overflowthresold, sinh(x) overflow */ + return x*shuge; + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(sinh, sinhl); +-#endif +diff --git a/s_asinh.cpp b/s_asinh.cpp +--- a/s_asinh.cpp ++++ b/s_asinh.cpp +@@ -50,12 +50,8 @@ asinh(double x) + t = fabs(x); + w = __ieee754_log(2.0*t+one/(__ieee754_sqrt(x*x+one)+t)); + } else { /* 2.0 > |x| > 2**-28 */ + t = x*x; + w =log1p(fabs(x)+t/(one+__ieee754_sqrt(one+t))); + } + if(hx>0) return w; else return -w; + } +- +-#if LDBL_MANT_DIG == 53 +-__weak_reference(asinh, asinhl); +-#endif +diff --git a/s_atan.cpp b/s_atan.cpp +--- a/s_atan.cpp ++++ b/s_atan.cpp +@@ -112,12 +112,8 @@ atan(double x) + s1 = z*(aT[0]+w*(aT[2]+w*(aT[4]+w*(aT[6]+w*(aT[8]+w*aT[10]))))); + s2 = w*(aT[1]+w*(aT[3]+w*(aT[5]+w*(aT[7]+w*aT[9])))); + if (id<0) return x - x*(s1+s2); + else { + z = atanhi[id] - ((x*(s1+s2) - atanlo[id]) - x); + return (hx<0)? -z:z; + } + } +- +-#if LDBL_MANT_DIG == 53 +-__weak_reference(atan, atanl); +-#endif +diff --git a/s_cbrt.cpp b/s_cbrt.cpp +--- a/s_cbrt.cpp ++++ b/s_cbrt.cpp +@@ -106,12 +106,8 @@ cbrt(double x) + s=t*t; /* t*t is exact */ + r=x/s; /* error <= 0.5 ulps; |r| < |t| */ + w=t+t; /* t+t is exact */ + r=(r-t)/(w+r); /* r-t is exact; w+r ~= 3*t */ + t=t+t*r; /* error <= (0.5 + 0.5/3) * ulp */ + + return(t); + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(cbrt, cbrtl); +-#endif +diff --git a/s_ceil.cpp b/s_ceil.cpp +--- a/s_ceil.cpp ++++ b/s_ceil.cpp +@@ -65,12 +65,8 @@ ceil(double x) + } + } + i1 &= (~i); + } + } + INSERT_WORDS(x,i0,i1); + return x; + } +- +-#if LDBL_MANT_DIG == 53 +-__weak_reference(ceil, ceill); +-#endif +diff --git a/s_cos.cpp b/s_cos.cpp +--- a/s_cos.cpp ++++ b/s_cos.cpp +@@ -77,12 +77,8 @@ cos(double x) + case 0: return __kernel_cos(y[0],y[1]); + case 1: return -__kernel_sin(y[0],y[1],1); + case 2: return -__kernel_cos(y[0],y[1]); + default: + return __kernel_sin(y[0],y[1],1); + } + } + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(cos, cosl); +-#endif +diff --git a/s_expm1.cpp b/s_expm1.cpp +--- a/s_expm1.cpp ++++ b/s_expm1.cpp +@@ -210,12 +210,8 @@ expm1(double x) + SET_HIGH_WORD(t,((0x3ff-k)<<20)); /* 2^-k */ + y = x-(e+t); + y += one; + y = y*twopk; + } + } + return y; + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(expm1, expm1l); +-#endif +diff --git a/s_floor.cpp b/s_floor.cpp +--- a/s_floor.cpp ++++ b/s_floor.cpp +@@ -66,12 +66,8 @@ floor(double x) + } + } + i1 &= (~i); + } + } + INSERT_WORDS(x,i0,i1); + return x; + } +- +-#if LDBL_MANT_DIG == 53 +-__weak_reference(floor, floorl); +-#endif +diff --git a/s_log1p.cpp b/s_log1p.cpp +--- a/s_log1p.cpp ++++ b/s_log1p.cpp +@@ -168,12 +168,8 @@ log1p(double x) + return k*ln2_hi-((R-(k*ln2_lo+c))-f); + } + s = f/(2.0+f); + z = s*s; + R = z*(Lp1+z*(Lp2+z*(Lp3+z*(Lp4+z*(Lp5+z*(Lp6+z*Lp7)))))); + if(k==0) return f-(hfsq-s*(hfsq+R)); else + return k*ln2_hi-((hfsq-(s*(hfsq+R)+(k*ln2_lo+c)))-f); + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(log1p, log1pl); +-#endif +diff --git a/s_rint.cpp b/s_rint.cpp +--- a/s_rint.cpp ++++ b/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/s_scalbn.cpp b/s_scalbn.cpp +--- a/s_scalbn.cpp ++++ b/s_scalbn.cpp +@@ -36,13 +36,8 @@ double scalbn(double x, int n) + if (n < -1022) + n = -1022; + } + } + u.i = (uint64_t)(0x3ff+n)<<52; + x = y * u.f; + return x; + } +- +-#if (LDBL_MANT_DIG == 53) && !defined(scalbn) +-__weak_reference(scalbn, ldexpl); +-__weak_reference(scalbn, scalbnl); +-#endif +diff --git a/s_sin.cpp b/s_sin.cpp +--- a/s_sin.cpp ++++ b/s_sin.cpp +@@ -77,12 +77,8 @@ sin(double x) + case 0: return __kernel_sin(y[0],y[1],1); + case 1: return __kernel_cos(y[0],y[1]); + case 2: return -__kernel_sin(y[0],y[1],1); + default: + return -__kernel_cos(y[0],y[1]); + } + } + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(sin, sinl); +-#endif +diff --git a/s_tan.cpp b/s_tan.cpp +--- a/s_tan.cpp ++++ b/s_tan.cpp +@@ -71,12 +71,8 @@ tan(double x) + + /* argument reduction needed */ + else { + n = __ieee754_rem_pio2(x,y); + return __kernel_tan(y[0],y[1],1-((n&1)<<1)); /* 1 -- n even + -1 -- n odd */ + } + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(tan, tanl); +-#endif +diff --git a/s_tanh.cpp b/s_tanh.cpp +--- a/s_tanh.cpp ++++ b/s_tanh.cpp +@@ -72,12 +72,8 @@ tanh(double x) + z= -t/(t+two); + } + /* |x| >= 22, return +-1 */ + } else { + z = one - tiny; /* raise inexact flag */ + } + return (jx>=0)? z: -z; + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(tanh, tanhl); +-#endif +diff --git a/s_trunc.cpp b/s_trunc.cpp +--- a/s_trunc.cpp ++++ b/s_trunc.cpp +@@ -55,12 +55,8 @@ trunc(double x) + i = ((u_int32_t)(0xffffffff))>>(j0-20); + if((i1&i)==0) return x; /* x is integral */ + if(huge+x>0.0) /* raise inexact flag */ + i1 &= (~i); + } + INSERT_WORDS(x,i0,i1); + return x; + } +- +-#if LDBL_MANT_DIG == 53 +-__weak_reference(trunc, truncl); +-#endif +--- a/s_exp2.cpp 2022-12-11 21:20:40.290068458 -0500 ++++ b/s_exp2.cpp_new 2022-12-11 21:20:57.490259247 -0500 +@@ -389,10 +389,6 @@ + return (r * 2.0 * 0x1p1023); + return (r * twopk); + } else { + return (r * twopkp1000 * twom1000); + } + } +- +-#if (LDBL_MANT_DIG == 53) +-__weak_reference(exp2, exp2l); +-#endif +--- a/s_scalbnf.cpp ++++ b/s_scalbnf.cpp +@@ -32,10 +34,8 @@ + if (n < -126) + n = -126; + } + } + u.i = (uint32_t)(0x7f+n)<<23; + x = y * u.f; + return x; + } +- +-__strong_reference(scalbnf, ldexpf); |