[PATCH 2/3] math: Use ptr_barrier on the CORE-MATH float tables
Adhemerval Zanella
adhemerval.zanella@linaro.org
Wed Sep 16 16:57:35 GMT 2026
Read every function-local constant table that is indexed with constant
indices through a ptr_barrier pointer, so GCC does not fold each element
into a separate literal.
Tables that are only indexed at run time or that live in a separate
translation unit are unaffected and left alone.
On aarch64 with GCC 15 this removes 400 of the 477 ADRP/LDR literal
loads in the 26 files (the remaining ones are scalar constants) and
reduces the instruction count by about 9%. With GCC 16 the code is
within a few instructions of the previous one, and the exp2m1f and
exp10m1f cold paths lose their remaining literal loads.
On Neoverse-N1 with gcc 15.2.1, the results with benchtests are:
function geomean
acosf -6.82%
acoshf -0.18%
asinf -5.74%
atan2f +1.83%
atanhf -1.17%
coshf -0.43%
lgammaf -5.40%
tgammaf -1.86%
log10f +0.13%
sinhf -0.23%
asinhf +0.03%
atan2pif -3.74%
atanf -3.30%
atanpif -2.34%
cbrtf -2.44%
erfcf +4.53%
erff -0.95%
exp10m1f +0.41%
exp2m1f -0.84%
expm1f +1.07%
log10p1f +0.70%
log2p1f +0.21%
tanf -3.56%
tanpif -0.24%
summary: 6 improvements, 1 regressions beyond 5%, geomean -1.30% (lower is better)
Checked on aarch64-linux-gnu with gcc-15 and gcc-16 and on
x86_64-linux-gnu.
---
sysdeps/ieee754/flt-32/e_acosf.c | 3 ++-
sysdeps/ieee754/flt-32/e_acoshf.c | 3 ++-
sysdeps/ieee754/flt-32/e_asinf.c | 3 ++-
sysdeps/ieee754/flt-32/e_atan2f.c | 8 +++++---
sysdeps/ieee754/flt-32/e_atanhf.c | 9 ++++++---
sysdeps/ieee754/flt-32/e_coshf.c | 3 ++-
sysdeps/ieee754/flt-32/e_gammaf_r.c | 3 ++-
sysdeps/ieee754/flt-32/e_lgammaf_r.c | 30 ++++++++++++++++++----------
sysdeps/ieee754/flt-32/e_log10f.c | 9 ++++++---
sysdeps/ieee754/flt-32/e_sinhf.c | 3 ++-
sysdeps/ieee754/flt-32/s_asinhf.c | 3 ++-
sysdeps/ieee754/flt-32/s_atan2pif.c | 8 +++++---
sysdeps/ieee754/flt-32/s_atanf.c | 6 ++++--
sysdeps/ieee754/flt-32/s_atanpif.c | 6 ++++--
sysdeps/ieee754/flt-32/s_cbrtf.c | 3 ++-
sysdeps/ieee754/flt-32/s_erfcf.c | 6 ++++--
sysdeps/ieee754/flt-32/s_erff.c | 3 ++-
sysdeps/ieee754/flt-32/s_exp10m1f.c | 21 ++++++++++++-------
sysdeps/ieee754/flt-32/s_exp2m1f.c | 21 ++++++++++++-------
sysdeps/ieee754/flt-32/s_expm1f.c | 9 ++++++---
sysdeps/ieee754/flt-32/s_log10p1f.c | 6 ++++--
sysdeps/ieee754/flt-32/s_log1pf.c | 6 ++++--
sysdeps/ieee754/flt-32/s_log2p1f.c | 9 ++++++---
sysdeps/ieee754/flt-32/s_tanf.c | 6 ++++--
sysdeps/ieee754/flt-32/s_tanhf.c | 6 ++++--
sysdeps/ieee754/flt-32/s_tanpif.c | 16 +++++++++++----
26 files changed, 140 insertions(+), 69 deletions(-)
diff --git a/sysdeps/ieee754/flt-32/e_acosf.c b/sysdeps/ieee754/flt-32/e_acosf.c
index 79deecaa545..d00a0918094 100644
--- a/sysdeps/ieee754/flt-32/e_acosf.c
+++ b/sysdeps/ieee754/flt-32/e_acosf.c
@@ -80,7 +80,7 @@ __acosf (float x)
return as_special (x);
if (__glibc_likely (ax < 0x7ec2a1dcu)) /* |x| < 0x1.c2a1dcp-1 */
{
- static const double b[] =
+ static const double b_data[] =
{
0x1.fffffffd9ccb8p-1, 0x1.5555c94838007p-3, 0x1.32ded4b7c20fap-4,
0x1.8566df703309ep-5, -0x1.980c959bec9a3p-6, 0x1.56fbb04998344p-1,
@@ -89,6 +89,7 @@ __acosf (float x)
-0x1.aca4b6a529ffp+9, 0x1.228744703f813p+9, -0x1.d7dbb0b322228p+7,
0x1.5c2018c0c0105p+5
};
+ const double *b = ptr_barrier (b_data);
/* Avoid spurious underflow exception. */
if (__glibc_unlikely (ax <= 0x40000000u)) /* |x| < 2^-63 */
/* GCC <= 11 wrongly assumes the rounding is to nearest and
diff --git a/sysdeps/ieee754/flt-32/e_acoshf.c b/sysdeps/ieee754/flt-32/e_acoshf.c
index 77bc15cccc0..3587209f3f6 100644
--- a/sysdeps/ieee754/flt-32/e_acoshf.c
+++ b/sysdeps/ieee754/flt-32/e_acoshf.c
@@ -56,13 +56,14 @@ __acoshf (float x)
float zf = x - 1.0f;
double z = zf;
double a = sqrt (2.0 * z);
- static const double c[] =
+ static const double c_data[] =
{
-0x1.555555555491ep-4, 0x1.333333319c2p-6,
-0x1.6db6da26e5e0ep-8, 0x1.f1c698b7100cep-10,
-0x1.6e7ca9e152dc2p-11, 0x1.1b4cf187158bdp-12,
-0x1.b5137f11a88e5p-14, 0x1.056c6c57152b2p-15
};
+ const double *c = ptr_barrier (c_data);
double z2 = z * z;
double z4 = z2 * z2;
double f = ((c[0] + z * c[1]) + z2 * (c[2] + z * c[3]))
diff --git a/sysdeps/ieee754/flt-32/e_asinf.c b/sysdeps/ieee754/flt-32/e_asinf.c
index fe9f6849efd..bc9e5b5df09 100644
--- a/sysdeps/ieee754/flt-32/e_asinf.c
+++ b/sysdeps/ieee754/flt-32/e_asinf.c
@@ -72,7 +72,7 @@ __asinf (float x)
{
if (__glibc_unlikely (ax < 115 << 24))
return fmaf (x, 0x1p-25, x);
- static const double b[] =
+ static const double b_data[] =
{
0x1.0000000000005p+0, 0x1.55557aeca105dp-3, 0x1.3314ec3db7d12p-4,
0x1.775738a5a6f92p-5, 0x1.5d5f7ce1c8538p-8, 0x1.605c6d58740fp-2,
@@ -81,6 +81,7 @@ __asinf (float x)
-0x1.36f2ea5698b51p+9, 0x1.b3d722aebfa2ep+8, -0x1.6cf89703b1289p+7,
0x1.1518af6a65e2dp+5
};
+ const double *b = ptr_barrier (b_data);
double z = xs;
double z2 = z * z;
double z4 = z2 * z2;
diff --git a/sysdeps/ieee754/flt-32/e_atan2f.c b/sysdeps/ieee754/flt-32/e_atan2f.c
index 03070e017da..3c5db1959a9 100644
--- a/sysdeps/ieee754/flt-32/e_atan2f.c
+++ b/sysdeps/ieee754/flt-32/e_atan2f.c
@@ -97,18 +97,20 @@ cr_atan2f_tiny (float y, float x)
float
__atan2f (float y, float x)
{
- static const double cn[] =
+ static const double cn_data[] =
{
0x1p+0, 0x1.40e0698f94c35p+1, 0x1.248c5da347f0dp+1,
0x1.d873386572976p-1, 0x1.46fa40b20f1dp-3, 0x1.33f5e041eed0fp-7,
0x1.546bbf28667c5p-14
};
- static const double cd[] =
+ const double *cn = ptr_barrier (cn_data);
+ static const double cd_data[] =
{
0x1p+0, 0x1.6b8b143a3f6dap+1, 0x1.8421201d18ed5p+1,
0x1.8221d086914ebp+0, 0x1.670657e3a07bap-2, 0x1.0f4951fd1e72dp-5,
0x1.b3874b8798286p-11
};
+ const double *cd = ptr_barrier (cd_data);
static const double m[] = { 0, 1 };
#define pi 0x1.921fb54442d18p+1
#define pi2 0x1.921fb54442d18p+0
@@ -253,7 +255,7 @@ __atan2f (float y, float x)
{ -0x1.29b7e6f676385p-23, -0x1.a783b6de718fbp-77 }
};
double pl;
- double ph = polydd (z2h, z2l, 32, c, &pl);
+ double ph = polydd (z2h, z2l, 32, ptr_barrier (c), &pl);
zh *= sgn[gt];
zl *= sgn[gt];
ph = muldd (zh, zl, ph, pl, &pl);
diff --git a/sysdeps/ieee754/flt-32/e_atanhf.c b/sysdeps/ieee754/flt-32/e_atanhf.c
index 64512e433e7..5a6fcebf0b4 100644
--- a/sysdeps/ieee754/flt-32/e_atanhf.c
+++ b/sysdeps/ieee754/flt-32/e_atanhf.c
@@ -103,10 +103,11 @@ __atanhf (float x)
0x1.a56ef8ec733d1p+2, 0x1.bb9d3beb6d77p+2, 0x1.d1cb7eea67b0fp+2,
0x1.e7f9c1e961eaep+2, 0x1.fe2804e85c24dp+2, 0x1.0a2b23f3ab2f6p+3
};
- static const double b[] =
+ static const double b_data[] =
{
0x1.fffffffce5a6ap-2, -0x1.0001f81ec0ab8p-2, 0x1.555a0f53d79a5p-3
};
+ const double *b = ptr_barrier (b_data);
static const double s[] = { 1, -1 };
uint32_t ux = asuint (x);
@@ -123,11 +124,12 @@ __atanhf (float x)
}
else
{ /* |x| < 0x1.3p-5 */
- static const double c[] =
+ static const double c_data[] =
{
0x1.5555555555527p-2, 0x1.9999999ba4ee8p-3,
0x1.24922c280990ap-3, 0x1.c8236aae809c6p-4
};
+ const double *c = ptr_barrier (c_data);
double z = x;
double z2 = z * z;
double z4 = z2 * z2;
@@ -156,12 +158,13 @@ __atanhf (float x)
float lb = r + sgn * 0.226e-9;
if (__glibc_unlikely (ub != lb))
{
- static const double c[] =
+ static const double c_data[] =
{
0x1p-1, -0x1.000000000001bp-2, 0x1.55555555555bap-3,
-0x1.fffffff26d72ep-4, 0x1.99999989035p-4, -0x1.555c39cb9ee8p-4,
0x1.24992d8b014a1p-4
};
+ const double *c = ptr_barrier (c_data);
double zn4 = zn2 * zn2;
double zd4 = zd2 * zd2;
double fn = zn * (((c[0] + zn * c[1]) + zn2 * (c[2] + zn * c[3]))
diff --git a/sysdeps/ieee754/flt-32/e_coshf.c b/sysdeps/ieee754/flt-32/e_coshf.c
index eae159ddf34..0e3b17e7930 100644
--- a/sysdeps/ieee754/flt-32/e_coshf.c
+++ b/sysdeps/ieee754/flt-32/e_coshf.c
@@ -56,11 +56,12 @@ __coshf (float x)
return fmaf (fabsf (x), 0x1p-25, 1.0f);
return (0.5f * x) * x + 1.0f;
}
- static const double cp[] =
+ static const double cp_data[] =
{
0x1.fffffffffffe3p-2, 0x1.55555555723cfp-5,
0x1.6c16bee4a5986p-10, 0x1.a0483fc0328f7p-16
};
+ const double *cp = ptr_barrier (cp_data);
double z2 = z * z;
double z4 = z2 * z2;
return 1.0 + z2 * ((cp[0] + z2 * cp[1]) + z4 * (cp[2] + z2 * (cp[3])));
diff --git a/sysdeps/ieee754/flt-32/e_gammaf_r.c b/sysdeps/ieee754/flt-32/e_gammaf_r.c
index ffc44a98262..6e0bc10be55 100644
--- a/sysdeps/ieee754/flt-32/e_gammaf_r.c
+++ b/sysdeps/ieee754/flt-32/e_gammaf_r.c
@@ -119,7 +119,7 @@ __tgammaf (float x)
return __math_uflowf (k & 1);
/* The array c[] stores a degree-15 polynomial approximation for
gamma(x). */
- static const double c[] =
+ static const double c_data[] =
{
0x1.c9a76be577123p+0, 0x1.8f2754ddcf90dp+0, 0x1.0d1191949419bp+0,
0x1.e1f42cf0ae4a1p-2, 0x1.82b358a3ab638p-3, 0x1.e1f2b30cd907bp-5,
@@ -128,6 +128,7 @@ __tgammaf (float x)
0x1.471ca49184475p-19, -0x1.368f0b7ed9e36p-23, 0x1.882222f9049efp-23,
-0x1.a69ed2042842cp-25
};
+ const double *c = ptr_barrier (c_data);
double m = z - 0x1.7p+1;
double i = roundeven_finite (m);
diff --git a/sysdeps/ieee754/flt-32/e_lgammaf_r.c b/sysdeps/ieee754/flt-32/e_lgammaf_r.c
index 15aec671587..aec99b1feed 100644
--- a/sysdeps/ieee754/flt-32/e_lgammaf_r.c
+++ b/sysdeps/ieee754/flt-32/e_lgammaf_r.c
@@ -58,12 +58,13 @@ as_r8 (double x, const double *c)
static double
as_sinpi (double x)
{
- static const double c[] =
+ static const double c_data[] =
{
0x1p+2, -0x1.de9e64df22ea4p+1, 0x1.472be122401f8p+0,
-0x1.d4fcd82df91bp-3, 0x1.9f05c97e0aab2p-6, -0x1.f3091c427b611p-10,
0x1.b22c9bfdca547p-14, -0x1.15484325ef569p-18
};
+ const double *c = ptr_barrier (c_data);
x -= 0.5;
double x2 = x * x, x4 = x2 * x2, x8 = x4 * x4;
return (0.25 - x2)
@@ -76,12 +77,13 @@ as_ln (double x)
{
uint64_t t = asuint64 (x);
int e = (t >> 52) - 0x3ff;
- static const double c[] =
+ static const double c_data[] =
{
0x1.fffffffffff24p-1, -0x1.ffffffffd1d67p-2, 0x1.55555537802dep-2,
-0x1.ffffeca81b866p-3, 0x1.999611761d772p-3, -0x1.54f3e581b61bfp-3,
0x1.1e642b4cb5143p-3, -0x1.9115a5af1e1edp-4
};
+ const double *c = ptr_barrier (c_data);
static const double il[] =
{
0x1.59caeec280116p-57, 0x1.f0a30c01162aap-5, 0x1.e27076e2af2ebp-4,
@@ -201,7 +203,8 @@ __lgammaf_r (float x, int *signgamp)
-0x1.7dd25af0b83d4p+0, -0x1.36bf1880125fcp+0,
-0x1.1379fc8023d9cp+0, -0x1.03712e41525d2p+0
};
- f = (c0 * s) * as_r8 (s, rn) / as_r8 (s, rd) - as_ln (z);
+ f = (c0 * s) * as_r8 (s, ptr_barrier (rn)) / as_r8 (s, ptr_barrier (rd))
+ - as_ln (z);
}
else
{ /* |x| >= 0x1.52p-1 */
@@ -231,31 +234,34 @@ __lgammaf_r (float x, int *signgamp)
f += iz * (1. / 12.);
else if (ax > 0x1.279a7p+6f)
{
- static const double c[] =
+ static const double c_data[] =
{
0x1.555555547fbadp-4, -0x1.6c0fd270c465p-9
};
+ const double *c = ptr_barrier (c_data);
f += iz * (c[0] + iz2 * c[1]);
}
else if (ax > 0x1.555556p+3f)
{
- static const double c[] =
+ static const double c_data[] =
{
0x1.555555554de0bp-4, -0x1.6c16bdc45944fp-9,
0x1.a0077f300ecb3p-11, -0x1.2e9cfff3b29c2p-11
};
+ const double *c = ptr_barrier (c_data);
double iz4 = iz2 * iz2;
f += iz * ((c[0] + iz2 * c[1]) + iz4 * (c[2] + iz2 * c[3]));
}
else
{
- static const double c[] =
+ static const double c_data[] =
{
0x1.5555555551286p-4, -0x1.6c16c0e7c4cf4p-9,
0x1.a0193267fe6f2p-11, -0x1.37e87ec19cb45p-11,
0x1.b40011dfff081p-11, -0x1.c16c8946b19b6p-10,
0x1.e9f47ace150d8p-9, -0x1.4f5843a71a338p-8
};
+ const double *c = ptr_barrier (c_data);
double iz4 = iz2 * iz2, iz8 = iz4 * iz4;
double p = ((c[0] + iz2 * c[1]) + iz4 * (c[2] + iz2 * c[3]))
+ iz8 * ((c[4] + iz2 * c[5])
@@ -287,7 +293,8 @@ __lgammaf_r (float x, int *signgamp)
-0x1.1302e3337271p+0, -0x1.c36b802f26dffp-2,
-0x1.3ded448acc39dp-3, -0x1.bffc491078eafp-6
};
- f = (z - 1) * (z - 2) * c0 * as_r7 (z, rn) / as_r8 (z, rd);
+ f = (z - 1) * (z - 2) * c0 * as_r7 (z, ptr_barrier (rn))
+ / as_r8 (z, ptr_barrier (rd));
if (x < 0.0f)
{
if (__glibc_unlikely (t < 0x40301b93u && t > 0x402f95c2u))
@@ -296,13 +303,14 @@ __lgammaf_r (float x, int *signgamp)
- 0x1.a19a96d2e6f85p-54;
double h2 = h * h;
double h4 = h2 * h2;
- static const double c[] =
+ static const double c_data[] =
{
-0x1.ea12da904b18cp+0, 0x1.3267f3c265a54p+3,
-0x1.4185ac30cadb3p+4, 0x1.f504accc3f2e4p+5,
-0x1.8588444c679b4p+7, 0x1.43740491dc22p+9,
-0x1.12400ea23f9e6p+11, 0x1.dac829f365795p+12
};
+ const double *c = ptr_barrier (c_data);
f = h * ((c[0] + h * c[1]) + h2 * (c[2] + h * c[3])
+ h4 * ((c[4] + h * c[5]) + h2 * (c[6] + h * c[7])));
}
@@ -312,13 +320,14 @@ __lgammaf_r (float x, int *signgamp)
+ 0x1.55f64f98af8dp-55;
double h2 = h * h;
double h4 = h2 * h2;
- static const double c[] =
+ static const double c_data[] =
{
0x1.83fe966af535fp+0, 0x1.36eebb002f61ap+2,
0x1.694a60589a0b3p+0, 0x1.1718d7aedb0b5p+3,
0x1.733a045eca0d3p+2, 0x1.8d4297421205bp+4,
0x1.7feea5fb29965p+4
};
+ const double *c = ptr_barrier (c_data);
f = h
* ((c[0] + h * c[1]) + h2 * (c[2] + h * c[3])
+ h4 * ((c[4] + h * c[5]) + h2 * (c[6])));
@@ -329,13 +338,14 @@ __lgammaf_r (float x, int *signgamp)
+ 0x1.f717cd335a7b3p-53;
double h2 = h * h;
double h4 = h2 * h2;
- static const double c[] =
+ static const double c_data[] =
{
0x1.f20a65f2fac55p+2, 0x1.9d4d297715105p+4,
0x1.c1137124d5b21p+6, 0x1.267203d24de38p+9,
0x1.99a63399a0b44p+11, 0x1.2941214faaf0cp+14,
0x1.bb912c0c9cdd1p+16
};
+ const double *c = ptr_barrier (c_data);
f = h * ((c[0] + h * c[1]) + h2 * (c[2] + h * c[3])
+ h4 * ((c[4] + h * c[5]) + h2 * (c[6])));
}
diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c
index e731500ef5c..f0be334859b 100644
--- a/sysdeps/ieee754/flt-32/e_log10f.c
+++ b/sysdeps/ieee754/flt-32/e_log10f.c
@@ -75,7 +75,7 @@ __log10f (float x)
0.5
};
// logarithms of the reciprocals with offset
- static const double tl[] =
+ static const double tl_data[] =
{
-0x1.2p-46, 0x1.b947689310dfap-8, 0x1.b5e909c96d11bp-7,
0x1.45f4f59ed1e08p-6, 0x1.af5f92cbd8bc1p-6, 0x1.0ba01a606dcdep-5,
@@ -100,6 +100,7 @@ __log10f (float x)
0x1.2622b0f52e469p-2, 0x1.29b522a4c62dep-2, 0x1.2d404b0e30f4ap-2,
0x1.30c4478f3fbafp-2, 0x1.34413509f78dfp-2
};
+ const double *tl = ptr_barrier (tl_data);
// 10^n
static const union
{
@@ -112,16 +113,18 @@ __log10f (float x)
{ 0 }, { 0x1.e848p+19 }, { 0 }, { 0x1.312dp+23 },
{ 0x1.7d784p+26 }, { 0 }, { 0x1.dcd65p+29 }, { 0x1p+0 }
};
- static const double b[] =
+ static const double b_data[] =
{
0x1.bcb7b15d35067p-2, -0x1.bcbb1cd29cbafp-3, 0x1.2870e2624ce4ep-3
};
- static const double c[] =
+ const double *b = ptr_barrier (b_data);
+ static const double c_data[] =
{
0x1.bcb7b1526e50ep-2, -0x1.bcb7b1526e53dp-3, 0x1.287a7636f3fa2p-3,
-0x1.bcb7b146a14b3p-4, 0x1.63c627d5219cbp-4, -0x1.2880736c8762dp-4,
0x1.fc1ecf913961ap-5
};
+ const double *c = ptr_barrier (c_data);
// ln(2)/ln(10)
const double ln10 = 0x1.34413509f79ffp-2,
diff --git a/sysdeps/ieee754/flt-32/e_sinhf.c b/sysdeps/ieee754/flt-32/e_sinhf.c
index 687f75332ef..214f41dfd93 100644
--- a/sysdeps/ieee754/flt-32/e_sinhf.c
+++ b/sysdeps/ieee754/flt-32/e_sinhf.c
@@ -64,11 +64,12 @@ __sinhf (float x)
}
return (x * 0x1.555556p-3f) * (x * x) + x;
}
- static const double cp[] =
+ static const double cp_data[] =
{
0x1.5555555555555p-3, 0x1.11111111146e1p-7,
0x1.a01a00930dda6p-13, 0x1.71f92198aa6e9p-19
};
+ const double *cp = ptr_barrier (cp_data);
double z2 = z * z;
double z4 = z2 * z2;
return z + (z2 * z)
diff --git a/sysdeps/ieee754/flt-32/s_asinhf.c b/sysdeps/ieee754/flt-32/s_asinhf.c
index 471a448992f..4ea3edd8a8d 100644
--- a/sysdeps/ieee754/flt-32/s_asinhf.c
+++ b/sysdeps/ieee754/flt-32/s_asinhf.c
@@ -44,12 +44,13 @@ __asinhf (float x)
return x;
return fmaf (x, -0x1p-25f, x);
}
- static const double c[] =
+ static const double c_data[] =
{
0x1.5555555555553p-3, -0x1.3333333330e9dp-4, 0x1.6db6db67cb37ap-5,
-0x1.f1c71699375dp-6, 0x1.6e8a374c39ff9p-6, -0x1.1c1e98f9d01e1p-6,
0x1.c277e96d84026p-7, -0x1.329ff5faf02abp-7
};
+ const double *c = ptr_barrier (c_data);
double x2 = xs * xs;
double x4 = x2 * x2;
double x8 = x4 * x4;
diff --git a/sysdeps/ieee754/flt-32/s_atan2pif.c b/sysdeps/ieee754/flt-32/s_atan2pif.c
index 8c9cbc13730..5da680c6304 100644
--- a/sysdeps/ieee754/flt-32/s_atan2pif.c
+++ b/sysdeps/ieee754/flt-32/s_atan2pif.c
@@ -63,18 +63,20 @@ polydd (double xh, double xl, int n, const double c[][2], double *l)
float
__atan2pif (float y, float x)
{
- static const double cn[] =
+ static const double cn_data[] =
{
0x1.45f306dc9c883p-2, 0x1.988d83a142adap-1, 0x1.747bebf492057p-1,
0x1.2cc5645094ff3p-2, 0x1.a0521c711ab66p-5, 0x1.881b8058b9a0dp-9,
0x1.b16ff514a0afp-16
};
- static const double cd[] =
+ const double *cn = ptr_barrier (cn_data);
+ static const double cd_data[] =
{
0x1p+0, 0x1.6b8b143a3f6dap+1, 0x1.8421201d18ed5p+1,
0x1.8221d086914ebp+0, 0x1.670657e3a07bap-2, 0x1.0f4951fd1e72dp-5,
0x1.b3874b8798286p-11
};
+ const double *cd = ptr_barrier (cd_data);
static const double m[] = { 0, 1 };
static const double off[]
= { 0.0f, 0.5f, 1.0f, 0.5f, -0.0f, -0.5f, -1.0f, -0.5f };
@@ -211,7 +213,7 @@ __atan2pif (float y, float x)
{ 0x1.91e15e7ab5bdcp-21, -0x1.730dbc6279d0dp-77 },
{ -0x1.7b1119c1ff867p-25, 0x1.145f9980759c4p-79 }
};
- double pl, ph = polydd (z2h, z2l, 32, c, &pl);
+ double pl, ph = polydd (z2h, z2l, 32, ptr_barrier (c), &pl);
zh *= sgn[gt];
zl *= sgn[gt];
ph = muldd (zh, zl, ph, pl, &pl);
diff --git a/sysdeps/ieee754/flt-32/s_atanf.c b/sysdeps/ieee754/flt-32/s_atanf.c
index 147f69f9a8b..0d7de8937a6 100644
--- a/sysdeps/ieee754/flt-32/s_atanf.c
+++ b/sysdeps/ieee754/flt-32/s_atanf.c
@@ -68,18 +68,20 @@ __atanf (float x)
cd[0] was slightly reduced from the original value 0x1.51eccde075d67p-2 to
avoid an exceptional case for |x| = 0x1.1ad646p-4 and rounding to nearest.
*/
- static const double cn[] =
+ static const double cn_data[] =
{
0x1.51eccde075d67p-2, 0x1.a76bb5637f2f2p-1, 0x1.81e0eed20de88p-1,
0x1.376c8ca67d11dp-2, 0x1.aec7b69202ac6p-5, 0x1.9561899acc73ep-9,
0x1.bf9fa5b67e6p-16
};
- static const double cd[] =
+ const double *cn = ptr_barrier (cn_data);
+ static const double cd_data[] =
{
0x1.51eccde075d66p-2, 0x1.dfbdd7b392d28p-1, 0x1p+0,
0x1.fd22bf0e89b54p-2, 0x1.d91ff8b576282p-4, 0x1.653ea99fc9bbp-7,
0x1.1e7fcc202340ap-12
};
+ const double *cd = ptr_barrier (cd_data);
double cn0 = cn[0] + z2 * cn[1];
double cn2 = cn[2] + z2 * cn[3];
double cn4 = cn[4] + z2 * cn[5];
diff --git a/sysdeps/ieee754/flt-32/s_atanpif.c b/sysdeps/ieee754/flt-32/s_atanpif.c
index 0a46a5bcd05..f7355dd4df8 100644
--- a/sysdeps/ieee754/flt-32/s_atanpif.c
+++ b/sysdeps/ieee754/flt-32/s_atanpif.c
@@ -77,17 +77,19 @@ __atanpif (float x)
double z2 = z * z;
double z4 = z2 * z2;
double z8 = z4 * z4;
- static const double cn[] =
+ static const double cn_data[] =
{
0x1.45f306dc9c882p-2, 0x1.733b561bc23d5p-1, 0x1.28d9805bdfbf2p-1,
0x1.8c3ba966ae287p-3, 0x1.94a7f81ee634bp-6, 0x1.a6bbf6127a6dfp-11
};
- static const double cd[] =
+ const double *cn = ptr_barrier (cn_data);
+ static const double cd_data[] =
{
0x1p+0, 0x1.4e3b3ecc2518fp+1, 0x1.3ef4a360ff063p+1,
0x1.0f1dc55bad551p+0, 0x1.8da0fecc018a4p-3, 0x1.8fa87803776bfp-7,
0x1.dadf2ca0acb43p-14
};
+ const double *cd = ptr_barrier (cd_data);
double cn0 = cn[0] + z2 * cn[1];
double cn2 = cn[2] + z2 * cn[3];
double cn4 = cn[4] + z2 * cn[5];
diff --git a/sysdeps/ieee754/flt-32/s_cbrtf.c b/sysdeps/ieee754/flt-32/s_cbrtf.c
index df9e888c1f7..066d66299c5 100644
--- a/sysdeps/ieee754/flt-32/s_cbrtf.c
+++ b/sysdeps/ieee754/flt-32/s_cbrtf.c
@@ -64,12 +64,13 @@ __cbrtf (float x)
isc += (uint64_t) (et - 342) << 52;
isc |= (uint64_t) sgn << 63;
double cvt2 = asdouble (isc);
- static const double c[] =
+ static const double c_data[] =
{
0x1.2319d352ea5d5p-1, 0x1.67ad8ee258d1ap-1, -0x1.9342edf9cbad9p-2,
0x1.b6388fc510a75p-3, -0x1.6002455599e2fp-4, 0x1.7b096936192c4p-6,
-0x1.e5577187e8bf8p-9, 0x1.169ef81d6c34ep-12
};
+ const double *c = ptr_barrier (c_data);
double z = asdouble ((uint64_t) mant << 28 | UINT64_C(0x3ff) << 52);
double r0 = -0x1.9931c6c2d19d1p-6 / z;
double z2 = z * z;
diff --git a/sysdeps/ieee754/flt-32/s_erfcf.c b/sysdeps/ieee754/flt-32/s_erfcf.c
index d15d77a38a2..da301346898 100644
--- a/sysdeps/ieee754/flt-32/s_erfcf.c
+++ b/sysdeps/ieee754/flt-32/s_erfcf.c
@@ -126,11 +126,12 @@ __erfcf (float xf)
return 1.0f + d[sgn];
}
/* around 0, erfc(x) behaves as 1 - (odd polynomial) */
- static const double c[] =
+ static const double c_data[] =
{
0x1.20dd750429b6dp+0, -0x1.812746b03610bp-2, 0x1.ce2f218831d2fp-4,
-0x1.b82c609607dcbp-6, 0x1.553af09b8008ep-8
};
+ const double *c = ptr_barrier (c_data);
double f0 = (double) xf
* (c[0] + x2 * (c[1] + x2 * (c[2] + x2 * (c[3] + x2 * (c[4])))));
return 1.0 - f0;
@@ -143,11 +144,12 @@ __erfcf (float xf)
uint64_t jt = asuint64 (x2 * iln2 + -(1024 + 0x1p-8));
int64_t j = (int64_t) (jt << 12) >> 48;
double S = asdouble ((uint64_t)((j >> 7) + (0x3ff | sgn << 11)) << 52);
- static const double ch[] =
+ static const double ch_data[] =
{
-0x1.ffffffffff333p-2, 0x1.5555555556a14p-3, -0x1.55556666659b4p-5,
0x1.1111074cc7b22p-7
};
+ const double *ch = ptr_barrier (ch_data);
double d = (x2 + ln2h * j) + ln2l * j;
double d2 = d * d;
double e0 = E[j & 127];
diff --git a/sysdeps/ieee754/flt-32/s_erff.c b/sysdeps/ieee754/flt-32/s_erff.c
index 025c2079624..81cdeec8602 100644
--- a/sysdeps/ieee754/flt-32/s_erff.c
+++ b/sysdeps/ieee754/flt-32/s_erff.c
@@ -224,13 +224,14 @@ __erff (float x)
/* 0x3ee00000 corresponds to x = 0.4375, for smaller x we have i < 7. */
if (__glibc_unlikely (ux < 0x3ee00000u))
{
- static const double c[] =
+ static const double c_data[] =
{
0x1.20dd750429b6dp+0, -0x1.812746b0375fbp-2,
0x1.ce2f219fd6f45p-4, -0x1.b82ce2cbf0838p-6,
0x1.565bb655adb85p-8, -0x1.c025bfc879c94p-11,
0x1.f81718f61309cp-14, -0x1.cc67bd88f5867p-17
};
+ const double *c = ptr_barrier (c_data);
double z2 = s * s, z4 = z2 * z2, z8 = z4 * z4;
double c0 = c[0] + z2 * c[1];
double c2 = c[2] + z2 * c[3];
diff --git a/sysdeps/ieee754/flt-32/s_exp10m1f.c b/sysdeps/ieee754/flt-32/s_exp10m1f.c
index ea3173a1748..434ee0d3500 100644
--- a/sysdeps/ieee754/flt-32/s_exp10m1f.c
+++ b/sysdeps/ieee754/flt-32/s_exp10m1f.c
@@ -88,35 +88,38 @@ __exp10m1f (float x)
}
else
{
- static const double cp[] =
+ static const double cp_data[] =
{
0x1.26bb1bbb55515p+1, 0x1.53524c73cea69p+1,
0x1.0470595038cc2p+1, 0x1.2bd7609fe1561p+0
};
+ const double *cp = ptr_barrier (cp_data);
r = (cp[0] + z * cp[1])
+ z2 * (cp[2] + z * cp[3]);
}
}
else
{
- static const double cp[] =
+ static const double cp_data[] =
{
0x1.26bb1bbb55516p+1, 0x1.53524c73ce6dbp+1,
0x1.0470591de3024p+1, 0x1.2bd76b79060e6p+0,
0x1.1429ffd3a963dp-1
};
+ const double *cp = ptr_barrier (cp_data);
r = (cp[0] + z * cp[1])
+ z2 * (cp[2] + z * (cp[3] + z * cp[4]));
}
}
else
{
- static const double cp[] =
+ static const double cp_data[] =
{
0x1.26bb1bbb55516p+1, 0x1.53524c73cea67p+1,
0x1.0470591dc2953p+1, 0x1.2bd760a004d64p+0,
0x1.142a85da6f072p-1, 0x1.a7ed70725b00ep-3
};
+ const double *cp = ptr_barrier (cp_data);
r = (cp[0] + z * cp[1]) + z2
* ((cp[2] + z * cp[3])
+ z2 * (cp[4] + z * cp[5]));
@@ -124,13 +127,14 @@ __exp10m1f (float x)
}
else
{
- static const double cp[] =
+ static const double cp_data[] =
{
0x1.26bb1bbb55516p+1, 0x1.53524c73ceadep+1,
0x1.0470591de2bb4p+1, 0x1.2bd76099a9d33p+0,
0x1.1429ffd829b0bp-1, 0x1.a7f2a6a0f7dc8p-3,
0x1.16e4dfbce0f56p-4
};
+ const double *cp = ptr_barrier (cp_data);
r = (cp[0] + z * cp[1])
+ z2 * ((cp[2] + z * cp[3])
+ z2 * (cp[4] + z * (cp[5] + z * cp[6])));
@@ -138,13 +142,14 @@ __exp10m1f (float x)
}
else
{
- static const double cp[] =
+ static const double cp_data[] =
{
0x1.26bb1bbb55515p+1, 0x1.53524c73cea6ap+1,
0x1.0470591de476p+1, 0x1.2bd7609fd4ee2p+0,
0x1.1429ff70a9b48p-1, 0x1.a7ed71259ba5bp-3,
0x1.16f3004fb3ac1p-4, 0x1.4116b0388aa9fp-6
};
+ const double *cp = ptr_barrier (cp_data);
r = ((cp[0] + z * cp[1]) + z2 * (cp[2] + z * cp[3]))
+ (z2 * z2) * ((cp[4] + z * cp[5]) + z2 * (cp[6]
+ z * cp[7]));
@@ -152,12 +157,13 @@ __exp10m1f (float x)
}
else
{
- static const double cp[] =
+ static const double cp_data[] =
{
0x1.26bb1bbb55515p+1, 0x1.53524c73cea42p+1, 0x1.0470591de2d1dp+1,
0x1.2bd760a010a53p+0, 0x1.1429ffd16170cp-1, 0x1.a7ed6b2a0d97fp-3,
0x1.16e4e37fa51e4p-4, 0x1.4147fe4c1676fp-6, 0x1.4897c4b3e329ap-8
};
+ const double *cp = ptr_barrier (cp_data);
r = ((cp[0] + z * cp[1]) + z2 * (cp[2] + z * cp[3]))
+ (z2 * z2) * ((cp[4] + z * cp[5])
+ z2 * (cp[6] + z * (cp[7] + z * cp[8])));
@@ -177,11 +183,12 @@ __exp10m1f (float x)
0x1.ae89f995ad3adp+0, 0x1.c199bdd85529cp+0, 0x1.d5818dcfba487p+0,
0x1.ea4afa2a490dap+0
};
- static const double c[] =
+ static const double c_data[] =
{
0x1.62e42fefa398bp-5, 0x1.ebfbdff84555ap-11, 0x1.c6b08d4ad86d3p-17,
0x1.3b2ad1b1716a2p-23, 0x1.5d7472718ce9dp-30, 0x1.4a1d7f457ac56p-37
};
+ const double *c = ptr_barrier (c_data);
if (__glibc_unlikely ((ux << 11) == 0))
{
diff --git a/sysdeps/ieee754/flt-32/s_exp2m1f.c b/sysdeps/ieee754/flt-32/s_exp2m1f.c
index 325ffb11b03..5429bb3c6c2 100644
--- a/sysdeps/ieee754/flt-32/s_exp2m1f.c
+++ b/sysdeps/ieee754/flt-32/s_exp2m1f.c
@@ -83,11 +83,12 @@ __exp2m1f (float x)
return -0x1.2bdf76p-24 - 0x1.8p-77;
if (__glibc_unlikely (ux == 0x3338428du))
return 0x1.fee08ap-26 + 0x1p-80;
- static const double c[] =
+ static const double c_data[] =
{
0x1.62e42fefa39efp-1, 0x1.ebfbdff8548fdp-3,
0x1.c6b08d704a06dp-5
};
+ const double *c = ptr_barrier (c_data);
r = c[0] + z * (c[1] + z * c[2]);
}
}
@@ -95,47 +96,51 @@ __exp2m1f (float x)
{
if (__glibc_unlikely (ux == 0x388bca4fu))
return 0x1.839702p-15 - 0x1.8p-68;
- static const double c[] =
+ static const double c_data[] =
{
0x1.62e42fefa39efp-1, 0x1.ebfbdff82c58fp-3,
0x1.c6b08dc82b347p-5, 0x1.3b2ab6fbad172p-7
};
+ const double *c = ptr_barrier (c_data);
r = (c[0] + z * c[1]) + z2 * (c[2] + z * c[3]);
}
}
else
{
- static const double c[] =
+ static const double c_data[] =
{
0x1.62e42fefa39efp-1, 0x1.ebfbdff82c068p-3,
0x1.c6b08d704a6dcp-5, 0x1.3b2ac262c3eedp-7,
0x1.5d87fe7af779ap-10
};
+ const double *c = ptr_barrier (c_data);
r = (c[0] + z * c[1])
+ z2 * (c[2] + z * (c[3] + z * c[4]));
}
}
else
{
- static const double c[] =
+ static const double c_data[] =
{
0x1.62e42fefa39fp-1, 0x1.ebfbdff82c58dp-3,
0x1.c6b08d7011d13p-5, 0x1.3b2ab6fbd267dp-7,
0x1.5d88a81cea49ep-10, 0x1.430912ea9b963p-13
};
+ const double *c = ptr_barrier (c_data);
r = (c[0] + z * c[1])
+ z2 * ((c[2] + z * c[3]) + z2 * (c[4] + z * c[5]));
}
}
else
{
- static const double c[] =
+ static const double c_data[] =
{
0x1.62e42fefa39efp-1, 0x1.ebfbdff82c639p-3,
0x1.c6b08d7049f1cp-5, 0x1.3b2ab6f5243bdp-7,
0x1.5d87fe80a9e6cp-10, 0x1.430d0b9257fa8p-13,
0x1.ffcbfc4cf0952p-17
};
+ const double *c = ptr_barrier (c_data);
r = (c[0] + z * c[1])
+ z2 * ((c[2] + z * c[3])
+ z2 * (c[4] + z * (c[5] + z * c[6])));
@@ -143,13 +148,14 @@ __exp2m1f (float x)
}
else
{
- static const double c[] =
+ static const double c_data[] =
{
0x1.62e42fefa39efp-1, 0x1.ebfbdff82c591p-3,
0x1.c6b08d704cf6bp-5, 0x1.3b2ab6fba00cep-7,
0x1.5d87fdfdaadb4p-10, 0x1.4309137333066p-13,
0x1.ffe5e90daf7ddp-17, 0x1.62c0220eed731p-20
};
+ const double *c = ptr_barrier (c_data);
r = ((c[0] + z * c[1]) + z2 * (c[2] + z * c[3]))
+ (z2 * z2) * ((c[4] + z * c[5]) + z2 * (c[6] + z * c[7]));
}
@@ -158,12 +164,13 @@ __exp2m1f (float x)
}
else
{
- static const double c[] =
+ static const double c_data[] =
{
0x1.62e42fefa398bp-5, 0x1.ebfbdff84555ap-11,
0x1.c6b08d4ad86d3p-17, 0x1.3b2ad1b1716a2p-23,
0x1.5d7472718ce9dp-30, 0x1.4a1d7f457ac56p-37
};
+ const double *c = ptr_barrier (c_data);
static const double tb[] =
{
0x1p+0, 0x1.0b5586cf9890fp+0, 0x1.172b83c7d517bp+0,
diff --git a/sysdeps/ieee754/flt-32/s_expm1f.c b/sysdeps/ieee754/flt-32/s_expm1f.c
index a36e5781f5d..5e628ace07b 100644
--- a/sysdeps/ieee754/flt-32/s_expm1f.c
+++ b/sysdeps/ieee754/flt-32/s_expm1f.c
@@ -32,15 +32,17 @@ SOFTWARE.
float
__expm1f (float x)
{
- static const double c[] =
+ static const double c_data[] =
{
1, 0x1.62e42fef4c4e7p-6, 0x1.ebfd1b232f475p-13, 0x1.c6b19384ecd93p-20
};
- static const double ch[] =
+ const double *c = ptr_barrier (c_data);
+ static const double ch_data[] =
{
0x1.62e42fefa39efp-6, 0x1.ebfbdff82c58fp-13, 0x1.c6b08d702e0edp-20,
0x1.3b2ab6fb92e5ep-27, 0x1.5d886e6d54203p-35, 0x1.430976b8ce6efp-43
};
+ const double *ch = ptr_barrier (ch_data);
static const double td[] =
{
0x1p+0, 0x1.059b0d3158574p+0, 0x1.0b5586cf9890fp+0,
@@ -68,12 +70,13 @@ __expm1f (float x)
return x; /* x = +-0 */
return fmaf (fabsf (x), 0x1p-25f, x);
}
- static const double b[] =
+ static const double b_data[] =
{
0x1.fffffffffffc2p-2, 0x1.55555555555fep-3, 0x1.555555559767fp-5,
0x1.1111111098dc1p-7, 0x1.6c16bca988aa9p-10, 0x1.a01a07658483fp-13,
0x1.a05b04d2c3503p-16, 0x1.71de3a960b5e3p-19
};
+ const double *b = ptr_barrier (b_data);
double z2 = z * z, z4 = z2 * z2;
double r = z + z2
* ((b[0] + z * b[1]) + z2 * (b[2] + z * b[3])
diff --git a/sysdeps/ieee754/flt-32/s_log10p1f.c b/sysdeps/ieee754/flt-32/s_log10p1f.c
index ab881d505f5..8224af88d42 100644
--- a/sysdeps/ieee754/flt-32/s_log10p1f.c
+++ b/sysdeps/ieee754/flt-32/s_log10p1f.c
@@ -116,17 +116,19 @@ __log10p1f (float x)
{ 0 }, { 0x1.e847ep+19 }, { 0 }, { 0x1.312cfep+23 },
{ 0 }, { 0 }, { 0 }, { 0 }
};
- static const double b[] =
+ static const double b_data[] =
{
0x1.bcb7b150bf33dp-2, -0x1.bcb7b14b2164ep-3, 0x1.287de1f406bedp-3,
-0x1.bcbfad32135bdp-4
};
- static const double c[] =
+ const double *b = ptr_barrier (b_data);
+ static const double c_data[] =
{
0x1.bcb7b1526e50ep-2, -0x1.bcb7b1526e48ep-3, 0x1.287a7636f422fp-3,
-0x1.bcb7b15514181p-4, 0x1.63c62778ff0d1p-4, -0x1.287a581961505p-4,
0x1.fc3f60b6c20a5p-5, -0x1.bdb55f5990c49p-5, 0x1.8c4ba9c7c0692p-5
};
+ const double *c = ptr_barrier (c_data);
const double ln10 = 0x1.34413509f79ffp-2,
ln10h = 0x1.34413509f8p-2,
ln10l = -0x1.80433b83b532ap-44;
diff --git a/sysdeps/ieee754/flt-32/s_log1pf.c b/sysdeps/ieee754/flt-32/s_log1pf.c
index 4cd5fa10aa1..157891fecaa 100644
--- a/sysdeps/ieee754/flt-32/s_log1pf.c
+++ b/sysdeps/ieee754/flt-32/s_log1pf.c
@@ -75,7 +75,7 @@ __log1pf (float x)
0x1.3d9028a72cd5fp-1, 0x1.4618b9c1dd52dp-1, 0x1.4e7d825b8d20bp-1,
0x1.56bf9fab56a02p-1, 0x1.5ee02ab258ccap-1
};
- static const double b[] =
+ static const double b_data[] =
{
0x1p+0,
-0x1p-1,
@@ -86,11 +86,13 @@ __log1pf (float x)
0x1.24adeca50e2bcp-3,
-0x1.001ba33bf57cfp-3
};
- static const double c[] =
+ const double *b = ptr_barrier (b_data);
+ static const double c_data[] =
{
0x1.ffffffe1eac82p-1, -0x1.ffffff7da1724p-2, 0x1.5564d8fa59d0cp-2,
-0x1.001219d3dba2ap-2
};
+ const double *c = ptr_barrier (c_data);
double z = x;
uint32_t ux = asuint (x);
diff --git a/sysdeps/ieee754/flt-32/s_log2p1f.c b/sysdeps/ieee754/flt-32/s_log2p1f.c
index d5df51d1d61..5b8f856ce0c 100644
--- a/sysdeps/ieee754/flt-32/s_log2p1f.c
+++ b/sysdeps/ieee754/flt-32/s_log2p1f.c
@@ -99,18 +99,21 @@ __log2p1f (float x)
-0x1.e88c6ca77b00ep-1, -0x1.ee7b44ce9bdc6p-1, -0x1.f45e05f15ca47p-1,
-0x1.fa34e145a695p-1, -0x1.ffffffffffe3p-1
};
- static const double b[] = {
+ static const double b_data[] = {
0x1.7154765bab3edp+0, -0x1.71574d692522fp-1, 0x1.ec60b55c8f05p-2
};
- static const double c[] = {
+ const double *b = ptr_barrier (b_data);
+ static const double c_data[] = {
0x1.71547652b8314p+0, -0x1.71547652b7f67p-1, 0x1.ec709db872c6dp-2,
-0x1.715476b06590ep-2, 0x1.277c72c128c69p-2, -0x1.ec4ff30af701bp-3
};
- static const double g[] = {
+ const double *c = ptr_barrier (c_data);
+ static const double g_data[] = {
0x1.4ae0bf64f73a1p-26, -0x1.71547652b82fap-1, 0x1.ec709dc3bd7dep-2,
-0x1.71547652e6faap-2, 0x1.2776c0ff5c16ep-2, -0x1.ec70942dfbb5bp-3,
0x1.a673c6b6e2fa3p-3, -0x1.71b0db8113c46p-3
};
+ const double *g = ptr_barrier (g_data);
double z = x;
uint32_t ux = asuint (x);
diff --git a/sysdeps/ieee754/flt-32/s_tanf.c b/sysdeps/ieee754/flt-32/s_tanf.c
index 5ee1d6f35e7..d2163fd9146 100644
--- a/sysdeps/ieee754/flt-32/s_tanf.c
+++ b/sysdeps/ieee754/flt-32/s_tanf.c
@@ -123,16 +123,18 @@ __tanf (float x)
}
double z2 = z * z;
double z4 = z2 * z2;
- static const double cn[] =
+ static const double cn_data[] =
{
0x1.921fb54442d18p+0, -0x1.fd226e573289fp-2,
0x1.b7a60c8dac9f6p-6, -0x1.725beb40f33e5p-13
};
- static const double cd[] =
+ const double *cn = ptr_barrier (cn_data);
+ static const double cd_data[] =
{
0x1p+0, -0x1.2395347fb829dp+0,
0x1.2313660f29c36p-3, -0x1.9a707ab98d1c1p-9
};
+ const double *cd = ptr_barrier (cd_data);
static const double s[] = { 0, 1 };
double n = cn[0] + z2 * cn[1];
double n2 = cn[2] + z2 * cn[3];
diff --git a/sysdeps/ieee754/flt-32/s_tanhf.c b/sysdeps/ieee754/flt-32/s_tanhf.c
index e07f3589b8a..5dfac26f723 100644
--- a/sysdeps/ieee754/flt-32/s_tanhf.c
+++ b/sysdeps/ieee754/flt-32/s_tanhf.c
@@ -58,18 +58,20 @@ __tanhf (float x)
double z2 = z * z;
double z4 = z2 * z2;
double z8 = z4 * z4;
- static const double cn[] =
+ static const double cn_data[] =
{
0x1p+0, 0x1.30877b8b72d33p-3, 0x1.694aa09ae9e5ep-8,
0x1.4101377abb729p-14, 0x1.e0392b1db0018p-22, 0x1.2533756e546f7p-30,
0x1.d62e5abe6ae8ap-41, 0x1.b06be534182dep-54
};
- static const double cd[] =
+ const double *cn = ptr_barrier (cn_data);
+ static const double cd_data[] =
{
0x1p+0, 0x1.ed99131b0ebeap-2, 0x1.0d27ed6c95a69p-5,
0x1.7cbdaca0e9fccp-11, 0x1.b4e60b892578ep-18, 0x1.a6f707c5c71abp-26,
0x1.35a8b6e2cd94cp-35, 0x1.ca8230677aa01p-47
};
+ const double *cd = ptr_barrier (cd_data);
double n0 = cn[0] + z2 * cn[1];
double n2 = cn[2] + z2 * cn[3];
double n4 = cn[4] + z2 * cn[5];
diff --git a/sysdeps/ieee754/flt-32/s_tanpif.c b/sysdeps/ieee754/flt-32/s_tanpif.c
index a26854900b4..48a4db48f7b 100644
--- a/sysdeps/ieee754/flt-32/s_tanpif.c
+++ b/sysdeps/ieee754/flt-32/s_tanpif.c
@@ -77,10 +77,18 @@ __tanpif (float x)
double z = zf, z2 = z * z;
- static const double cn[] = { 0x1.921fb54442d19p-1, -0x1.1f458b3e1f8d6p-2,
- 0x1.68a34bd0b8f6ap-6, -0x1.e4866f7a25f99p-13 };
- static const double cd[] = { 0x1p+0, -0x1.4b4b98d2df3a7p-1,
- 0x1.8e9926d2bb901p-4, -0x1.a6f77fd847eep-9 };
+ static const double cn_data[] =
+ {
+ 0x1.921fb54442d19p-1, -0x1.1f458b3e1f8d6p-2,
+ 0x1.68a34bd0b8f6ap-6, -0x1.e4866f7a25f99p-13
+ };
+ const double *cn = ptr_barrier (cn_data);
+ static const double cd_data[] =
+ {
+ 0x1p+0, -0x1.4b4b98d2df3a7p-1,
+ 0x1.8e9926d2bb901p-4, -0x1.a6f77fd847eep-9
+ };
+ const double *cd = ptr_barrier (cd_data);
double z4
= z2 * z2,
r = (z - z * z2) * ((cn[0] + z2 * cn[1]) + z4 * (cn[2] + z2 * cn[3]))
--
2.53.0
More information about the Libc-alpha
mailing list