diff options
author | David Holsgrove <david.holsgrove@xilinx.com> | 2014-02-17 11:08:21 +1000 |
---|---|---|
committer | David Holsgrove <david.holsgrove@xilinx.com> | 2014-02-17 11:08:21 +1000 |
commit | ef114eafbff80525d079d7d6fadd69a58eb8dcc3 (patch) | |
tree | e643e00a609e9a6cda5ae90e2eb499cb992dd91b /sysdeps/microblaze/math_private.h | |
parent | ab7ac0f2cf8731fe4c3f3aea6088a7c0127b5725 (diff) | |
download | glibc-ef114eafbff80525d079d7d6fadd69a58eb8dcc3.tar.gz glibc-ef114eafbff80525d079d7d6fadd69a58eb8dcc3.tar.xz glibc-ef114eafbff80525d079d7d6fadd69a58eb8dcc3.zip |
[MicroBlaze]: Move MicroBlaze from ports to sysdeps.
2014-02-17 David Holsgrove <david.holsgrove@xilinx.com> * sysdeps/microblaze: Move directory from ports/sysdeps/microblaze. * sysdeps/unix/sysv/linux/microblaze: Move directory from ports/sysdeps/unix/sysv/linux/microblaze. * README: Add missing listing for microblaze*-*-linux-gnu. Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Diffstat (limited to 'sysdeps/microblaze/math_private.h')
-rw-r--r-- | sysdeps/microblaze/math_private.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sysdeps/microblaze/math_private.h b/sysdeps/microblaze/math_private.h new file mode 100644 index 0000000000..39b71722d3 --- /dev/null +++ b/sysdeps/microblaze/math_private.h @@ -0,0 +1,33 @@ +#ifndef _MATH_PRIVATE_H + +/* Suppress use of exceptions here to avoid build errors if the FE_* + macros aren't definied. Only allow rounding modes implemented for + MicroBlaze. + + This does mean that some code will silently fail to report exceptions, + set rounding mode as expected, etc., but it allows math code to compile + that otherwise wouldn't (such as math/s_fma.c) and so is valuable. + + We intentionally ignore the "exception" arguments of functions that + take an exception, since we can't even evaluate the argument + without causing a build failure. The extra level of statement + expression wrapping avoids "statement with no effect" warnings. + Since the callers don't check for errors anyway, we just claim + success in every case. + + The overrides for libc_ functions must happen before we include + the generic math_private.h, and the overrides for regular + <fenv.h> functions must happen afterwards, to avoid clashing with + the declarations of those functions. */ + +#define libc_fesetround(rnd) ({ 0; }) +#define libc_fetestexcept(exc) ({ 0; }) +#define libc_feholdexcept_setround(env, exc) ({ (void) (env); 0; }) +#define libc_feupdateenv_test(env, exc) ({ (void) (env); 0; }) + +#include_next <math_private.h> + +#define feraiseexcept(excepts) ({ 0; }) +#define feclearexcept(exc) ({ 0; }) + +#endif |