projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c4359e0
)
math: use '#pragma STDC FENV_ACCESS ON' when fenv is accessed
author
Szabolcs Nagy
<nsz@port70.net>
Tue, 13 Nov 2012 12:34:45 +0000
(13:34 +0100)
committer
Szabolcs Nagy
<nsz@port70.net>
Tue, 13 Nov 2012 12:34:45 +0000
(13:34 +0100)
src/fenv/feupdateenv.c
patch
|
blob
|
history
src/math/fma.c
patch
|
blob
|
history
src/math/fmaf.c
patch
|
blob
|
history
src/math/fmal.c
patch
|
blob
|
history
src/math/llrintl.c
patch
|
blob
|
history
src/math/lrint.c
patch
|
blob
|
history
src/math/lrintl.c
patch
|
blob
|
history
src/math/nearbyint.c
patch
|
blob
|
history
src/math/nearbyintf.c
patch
|
blob
|
history
src/math/nearbyintl.c
patch
|
blob
|
history
diff --git
a/src/fenv/feupdateenv.c
b/src/fenv/feupdateenv.c
index
50cef8e
..
f45ed7c
100644
(file)
--- a/
src/fenv/feupdateenv.c
+++ b/
src/fenv/feupdateenv.c
@@
-2,6
+2,7
@@
int feupdateenv(const fenv_t *envp)
{
int feupdateenv(const fenv_t *envp)
{
+ #pragma STDC FENV_ACCESS ON
int ex = fetestexcept(FE_ALL_EXCEPT);
fesetenv(envp);
feraiseexcept(ex);
int ex = fetestexcept(FE_ALL_EXCEPT);
fesetenv(envp);
feraiseexcept(ex);
diff --git
a/src/math/fma.c
b/src/math/fma.c
index
7076d4b
..
17f1cdc
100644
(file)
--- a/
src/math/fma.c
+++ b/
src/math/fma.c
@@
-89,6
+89,7
@@
static int getexp(long double x)
double fma(double x, double y, double z)
{
double fma(double x, double y, double z)
{
+ #pragma STDC FENV_ACCESS ON
long double hi, lo1, lo2, xy;
int round, ez, exy;
long double hi, lo1, lo2, xy;
int round, ez, exy;
@@
-306,6
+307,7
@@
static inline struct dd dd_mul(double a, double b)
*/
double fma(double x, double y, double z)
{
*/
double fma(double x, double y, double z)
{
+ #pragma STDC FENV_ACCESS ON
double xs, ys, zs, adj;
struct dd xy, r;
int oround;
double xs, ys, zs, adj;
struct dd xy, r;
int oround;
diff --git
a/src/math/fmaf.c
b/src/math/fmaf.c
index
cc427fb
..
a1c7f4f
100644
(file)
--- a/
src/math/fmaf.c
+++ b/
src/math/fmaf.c
@@
-37,6
+37,7
@@
*/
float fmaf(float x, float y, float z)
{
*/
float fmaf(float x, float y, float z)
{
+ #pragma STDC FENV_ACCESS ON
double xy, result;
uint32_t hr, lr;
double xy, result;
uint32_t hr, lr;
diff --git
a/src/math/fmal.c
b/src/math/fmal.c
index
be64f14
..
ccbe434
100644
(file)
--- a/
src/math/fmal.c
+++ b/
src/math/fmal.c
@@
-162,6
+162,7
@@
static inline struct dd dd_mul(long double a, long double b)
*/
long double fmal(long double x, long double y, long double z)
{
*/
long double fmal(long double x, long double y, long double z)
{
+ #pragma STDC FENV_ACCESS ON
long double xs, ys, zs, adj;
struct dd xy, r;
int oround;
long double xs, ys, zs, adj;
struct dd xy, r;
int oround;
diff --git
a/src/math/llrintl.c
b/src/math/llrintl.c
index
32bb8b0
..
3449f6f
100644
(file)
--- a/
src/math/llrintl.c
+++ b/
src/math/llrintl.c
@@
-18,6
+18,7
@@
raises inexact (with tonearest or upward rounding mode)
*/
long long llrintl(long double x)
{
*/
long long llrintl(long double x)
{
+ #pragma STDC FENV_ACCESS ON
int e;
e = fetestexcept(FE_INEXACT);
int e;
e = fetestexcept(FE_INEXACT);
diff --git
a/src/math/lrint.c
b/src/math/lrint.c
index
6709183
..
bdca8b7
100644
(file)
--- a/
src/math/lrint.c
+++ b/
src/math/lrint.c
@@
-28,6
+28,7
@@
as a double.
#if LONG_MAX < 1U<<53 && defined(FE_INEXACT)
long lrint(double x)
{
#if LONG_MAX < 1U<<53 && defined(FE_INEXACT)
long lrint(double x)
{
+ #pragma STDC FENV_ACCESS ON
int e;
e = fetestexcept(FE_INEXACT);
int e;
e = fetestexcept(FE_INEXACT);
diff --git
a/src/math/lrintl.c
b/src/math/lrintl.c
index
5eb1ba7
..
b2a8106
100644
(file)
--- a/
src/math/lrintl.c
+++ b/
src/math/lrintl.c
@@
-18,6
+18,7
@@
raises inexact (with tonearest or upward rounding mode)
*/
long lrintl(long double x)
{
*/
long lrintl(long double x)
{
+ #pragma STDC FENV_ACCESS ON
int e;
e = fetestexcept(FE_INEXACT);
int e;
e = fetestexcept(FE_INEXACT);
diff --git
a/src/math/nearbyint.c
b/src/math/nearbyint.c
index
7a4c58c
..
f4e8aac
100644
(file)
--- a/
src/math/nearbyint.c
+++ b/
src/math/nearbyint.c
@@
-6,6
+6,7
@@
double nearbyint(double x)
{
#ifdef FE_INEXACT
double nearbyint(double x)
{
#ifdef FE_INEXACT
+ #pragma STDC FENV_ACCESS ON
int e;
e = fetestexcept(FE_INEXACT);
int e;
e = fetestexcept(FE_INEXACT);
diff --git
a/src/math/nearbyintf.c
b/src/math/nearbyintf.c
index
39c3d73
..
092e9ff
100644
(file)
--- a/
src/math/nearbyintf.c
+++ b/
src/math/nearbyintf.c
@@
-4,6
+4,7
@@
float nearbyintf(float x)
{
#ifdef FE_INEXACT
float nearbyintf(float x)
{
#ifdef FE_INEXACT
+ #pragma STDC FENV_ACCESS ON
int e;
e = fetestexcept(FE_INEXACT);
int e;
e = fetestexcept(FE_INEXACT);
diff --git
a/src/math/nearbyintl.c
b/src/math/nearbyintl.c
index
0ff4b1f
..
8285249
100644
(file)
--- a/
src/math/nearbyintl.c
+++ b/
src/math/nearbyintl.c
@@
-11,6
+11,7
@@
long double nearbyintl(long double x)
long double nearbyintl(long double x)
{
#ifdef FE_INEXACT
long double nearbyintl(long double x)
{
#ifdef FE_INEXACT
+ #pragma STDC FENV_ACCESS ON
int e;
e = fetestexcept(FE_INEXACT);
int e;
e = fetestexcept(FE_INEXACT);