diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-04-20 14:06:21 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-04-20 14:06:21 +0200 |
commit | 168393089024b5f926836cb813fddf14e6b6e4d4 (patch) | |
tree | 5d018198dc26be847544f162b87ad3dcecbab479 /runtime/include/math.h | |
parent | 633b72565b022f159526338b5bbb9fcac86dfd2b (diff) | |
parent | b3431b1d9ee5121883d307cff0b62b7e53369891 (diff) | |
download | compcert-kvx-168393089024b5f926836cb813fddf14e6b6e4d4.tar.gz compcert-kvx-168393089024b5f926836cb813fddf14e6b6e4d4.zip |
Merge remote-tracking branch 'origin/mppa-work' into mppa-fast-div
(unfinished)
Diffstat (limited to 'runtime/include/math.h')
-rw-r--r-- | runtime/include/math.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/runtime/include/math.h b/runtime/include/math.h index 805cc8e7..01b8d8d8 100644 --- a/runtime/include/math.h +++ b/runtime/include/math.h @@ -1,7 +1,26 @@ #ifndef _COMPCERT_MATH_H #define _COMPCERT_MATH_H +#ifdef __K1C__ + #define isfinite(__y) (fpclassify((__y)) >= FP_ZERO) #include_next <math.h> + +#ifndef COMPCERT_NO_FP_MACROS +#define fmin(x, y) __builtin_fmin((x),(y)) +#define fmax(x, y) __builtin_fmax((x),(y)) +#define fminf(x, y) __builtin_fminf((x),(y)) +#define fmaxf(x, y) __builtin_fmaxf((x),(y)) +#define fabs(x) __builtin_fabs((x)) +#define fabsf(x) __builtin_fabsf((x)) +#define fma(x, y, z) __builtin_fma((x),(y),(z)) +#define fmaf(x, y, z) __builtin_fmaf((x),(y),(z)) +#endif + +#else + +#include_next <math.h> + +#endif #endif |