diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-22 20:17:37 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-11-22 20:17:37 +0000 |
commit | d07cca02aabeb84ea3ce80fd5c9b4925d57ceb53 (patch) | |
tree | 347e8f9e0370fa310ebe1b2aeae940f5bf06ec04 /fpu | |
parent | 47398b9c3681ebcd4eb942e732628cdfb172664e (diff) |
Add native softfloat fpu functions (Christoph Egger)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5775 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'fpu')
-rw-r--r-- | fpu/softfloat-native.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/fpu/softfloat-native.h b/fpu/softfloat-native.h index 379d49dfa..b51c0825b 100644 --- a/fpu/softfloat-native.h +++ b/fpu/softfloat-native.h @@ -8,8 +8,7 @@ #include <fenv.h> #endif -#ifdef __OpenBSD__ -/* Get OpenBSD version number */ +#if defined(__OpenBSD__) || defined(__NetBSD__) #include <sys/param.h> #endif @@ -35,6 +34,25 @@ #define unordered(x, y) (isnan(x) || isnan(y)) #endif +#ifdef __NetBSD__ +#ifndef isgreater +#define isgreater(x, y) __builtin_isgreater(x, y) +#endif +#ifndef isgreaterequal +#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y) +#endif +#ifndef isless +#define isless(x, y) __builtin_isless(x, y) +#endif +#ifndef islessequal +#define islessequal(x, y) __builtin_islessequal(x, y) +#endif +#ifndef isunordered +#define isunordered(x, y) __builtin_isunordered(x, y) +#endif +#endif + + #define isnormal(x) (fpclass(x) >= FP_NZERO) #define isgreater(x, y) ((!unordered(x, y)) && ((x) > (y))) #define isgreaterequal(x, y) ((!unordered(x, y)) && ((x) >= (y))) |