From d38f1dba009689d78af371cffa091b27e4ebe17d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 18 Oct 2011 09:00:46 -0400 Subject: Start optimizing the use of the fenv interfaces in libm itself --- math/math_private.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'math') diff --git a/math/math_private.h b/math/math_private.h index c5fbf15..a1ce014 100644 --- a/math/math_private.h +++ b/math/math_private.h @@ -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_ */ -- cgit v1.1