aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilco Dijkstra <wilco.dijkstra@arm.com>2024-12-13 15:43:07 +0000
committerWilco Dijkstra <wilco.dijkstra@arm.com>2025-02-28 15:13:31 +0000
commitd2febe7c407665c18cfea1930c65f41899ab3aa3 (patch)
treef730bca3e232b0d70a2e7748c11af2337ff7a213
parent20b5d5ce26f548286bb8d5c69db041d3b89268aa (diff)
downloadglibc-release/2.35/master.zip
glibc-release/2.35/master.tar.gz
glibc-release/2.35/master.tar.bz2
math: Improve layout of exp/exp10 datarelease/2.35/master
GCC aligns global data to 16 bytes if their size is >= 16 bytes. This patch changes the exp_data struct slightly so that the fields are better aligned and without gaps. As a result on targets that support them, more load-pair instructions are used in exp. The exp benchmark improves 2.5%, "144bits" by 7.2%, "768bits" by 12.7% on Neoverse V2. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> (cherry picked from commit 5afaf99edb326fd9f36eb306a828d129a3a1d7f7) (cherry picked from commit 5a08d049dc5037e89eb95bb1506652f0043fa39e)
-rw-r--r--sysdeps/ieee754/dbl-64/math_config.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/ieee754/dbl-64/math_config.h b/sysdeps/ieee754/dbl-64/math_config.h
index a346fdc..6c6cee5 100644
--- a/sysdeps/ieee754/dbl-64/math_config.h
+++ b/sysdeps/ieee754/dbl-64/math_config.h
@@ -134,10 +134,11 @@ check_uflow (double x)
extern const struct exp_data
{
double invln2N;
- double shift;
double negln2hiN;
double negln2loN;
double poly[4]; /* Last four coefficients. */
+ double shift;
+
double exp2_shift;
double exp2_poly[EXP2_POLY_ORDER];
uint64_t tab[2*(1 << EXP_TABLE_BITS)];