2013-05-19 Joseph Myers <joseph@codesourcery.com>
+ [BZ #15490]
+ * sysdeps/ieee754/dbl-64/s_nearbyint.c (__nearbyint): Use
+ math_force_eval before restoring floating-point envrionment.
+ * sysdeps/ieee754/flt-32/s_nearbyintf.c (__nearbyintf): Likewise.
+ * sysdeps/ieee754/ldbl-128/s_nearbyintl.c (__nearbyintl):
+ Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: Include
+ <math_private.h>.
+ (__nearbyintl): Use math_force_eval before restoring
+ floating-point environment.
+ * sysdeps/ieee754/ldbl-96/s_nearbyintl.c (__nearbyintl): Likewise.
+
* math/gen-libm-test.pl (special_functions): Remove.
(parse_args): Don't handle TEST_extra. Handle functions with no
return value.
15305, 15307, 15309, 15327, 15330, 15335, 15336, 15337, 15342, 15346,
15359, 15361, 15366, 15380, 15394, 15395, 15405, 15406, 15409, 15416,
15418, 15419, 15423, 15424, 15426, 15429, 15442, 15448, 15480, 15485,
- 15488.
+ 15488, 15490.
* CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
#15078).
libc_feholdexcept (&env);
w = TWO52[sx]+x;
t = w-TWO52[sx];
+ math_force_eval (t);
libc_fesetenv (&env);
GET_HIGH_WORD(i0,t);
SET_HIGH_WORD(t,(i0&0x7fffffff)|(sx<<31));
libc_feholdexcept (&env);
w = TWO52[sx]+x;
t = w-TWO52[sx];
+ math_force_eval (t);
libc_fesetenv (&env);
return t;
}
libc_feholdexceptf (&env);
w = TWO23[sx]+x;
t = w-TWO23[sx];
+ math_force_eval (t);
libc_fesetenvf (&env);
GET_FLOAT_WORD(i0,t);
SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31));
libc_feholdexceptf (&env);
w = TWO23[sx]+x;
t = w-TWO23[sx];
+ math_force_eval (t);
libc_fesetenvf (&env);
return t;
}
feholdexcept (&env);
w = TWO112[sx]+x;
t = w-TWO112[sx];
+ math_force_eval (t);
fesetenv (&env);
GET_LDOUBLE_MSW64(i0,t);
SET_LDOUBLE_MSW64(t,(i0&0x7fffffffffffffffLL)|(sx<<63));
feholdexcept (&env);
w = TWO112[sx]+x;
t = w-TWO112[sx];
+ math_force_eval (t);
fesetenv (&env);
return t;
}
when it's coded in C. */
#include <math.h>
+#include <math_private.h>
#include <fenv.h>
#include <math_ldbl_opt.h>
#include <float.h>
}
u.dd[0] = high;
u.dd[1] = 0.0;
+ math_force_eval (u.dd[0]);
+ math_force_eval (u.dd[1]);
fesetenv (&env);
}
else if (fabs (u.dd[1]) < TWO52 && u.dd[1] != 0.0)
}
u.dd[0] = high + low;
u.dd[1] = high - u.dd[0] + low;
+ math_force_eval (u.dd[0]);
+ math_force_eval (u.dd[1]);
fesetenv (&env);
}
feholdexcept (&env);
w = TWO63[sx]+x;
t = w-TWO63[sx];
+ math_force_eval (t);
fesetenv (&env);
GET_LDOUBLE_EXP(i0,t);
SET_LDOUBLE_EXP(t,(i0&0x7fff)|(sx<<15));
feholdexcept (&env);
w = TWO63[sx]+x;
t = w-TWO63[sx];
+ math_force_eval (t);
fesetenv (&env);
return t;
}