1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-24 13:33:08 +03:00

Start optimizing the use of the fenv interfaces in libm itself

This commit is contained in:
Ulrich Drepper
2011-10-18 09:00:46 -04:00
parent 83c7615c2d
commit d38f1dba00
5 changed files with 95 additions and 31 deletions

View File

@@ -358,4 +358,26 @@ extern void __docos (double __x, double __dx, double __v[]);
#define math_force_eval(x) __asm __volatile ("" : : "m" (x))
#endif
/* The standards only specify one variant of the fenv.h interfaces.
But at least for some architectures we can be more efficient if we
know what operations are going to be performed. Therefore we
define additional interfaces. By default they refer to the normal
interfaces. */
#define libc_fegetround() fegetround ()
#define libc_fegetroundf() fegetround ()
#define libc_fegetroundl() fegetround ()
#define libc_fesetround(r) (void) fesetround (r)
#define libc_fesetroundf(r) (void) fesetround (r)
#define libc_fesetroundl(r) (void) fesetround (r)
#define libc_feholdexcept(e) (void) feholdexcept (e)
#define libc_feholdexceptf(e) (void) feholdexcept (e)
#define libc_feholdexceptl(e) (void) feholdexcept (e)
#define libc_fesetenv(e) (void) fesetenv (e)
#define libc_fesetenvf(e) (void) fesetenv (e)
#define libc_fesetenvl(e) (void) fesetenv (e)
#endif /* _MATH_PRIVATE_H_ */