]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Don't use volatile in exp2f.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 23 Sep 2015 22:52:13 +0000 (22:52 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 23 Sep 2015 22:52:13 +0000 (22:52 +0000)
sysdeps/ieee754/flt-32/e_exp2f.c declares two variable as "static
const volatile float".  Maybe this use of "volatile" was originally
intended to inhibit optimization of underflowing / overflowing
operations such as TWOM100 * TWOM100; in any case, it's not currently
needed, as given -frounding-math constant folding of such expressions
is properly disabled when it would be unsafe.  This patch removes the
unnecessary use of "volatile".

Tested for x86_64.

* sysdeps/ieee754/flt-32/e_exp2f.c (TWOM100): Remove volatile.
(TWO127): Likewise.

ChangeLog
sysdeps/ieee754/flt-32/e_exp2f.c

index 20fd655b0739b70aba8d25b62621a6d1d63f2d49..019b66f836bbae993845a62c1f5f088bc23bd104 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-09-23  Joseph Myers  <joseph@codesourcery.com>
 
+       * sysdeps/ieee754/flt-32/e_exp2f.c (TWOM100): Remove volatile.
+       (TWO127): Likewise.
+
        * sysdeps/generic/math_private.h (fabs_tg): New macro.
        (min_of_type): Likewise.
        (math_check_force_underflow): Likewise.
index d8e7a9c8bca0d3ad4281ab9341e80d29045fbed7..c0533403108583a08508ab7b0aa94a24f2020773 100644 (file)
@@ -37,8 +37,8 @@
 
 #include "t_exp2f.h"
 
-static const volatile float TWOM100 = 7.88860905e-31;
-static const volatile float TWO127 = 1.7014118346e+38;
+static const float TWOM100 = 7.88860905e-31;
+static const float TWO127 = 1.7014118346e+38;
 
 float
 __ieee754_exp2f (float x)