Commit d07cca02aabeb84ea3ce80fd5c9b4925d57ceb53
1 parent
47398b9c
Add native softfloat fpu functions (Christoph Egger)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5775 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
20 additions
and
2 deletions
fpu/softfloat-native.h
... | ... | @@ -8,8 +8,7 @@ |
8 | 8 | #include <fenv.h> |
9 | 9 | #endif |
10 | 10 | |
11 | -#ifdef __OpenBSD__ | |
12 | -/* Get OpenBSD version number */ | |
11 | +#if defined(__OpenBSD__) || defined(__NetBSD__) | |
13 | 12 | #include <sys/param.h> |
14 | 13 | #endif |
15 | 14 | |
... | ... | @@ -35,6 +34,25 @@ |
35 | 34 | #define unordered(x, y) (isnan(x) || isnan(y)) |
36 | 35 | #endif |
37 | 36 | |
37 | +#ifdef __NetBSD__ | |
38 | +#ifndef isgreater | |
39 | +#define isgreater(x, y) __builtin_isgreater(x, y) | |
40 | +#endif | |
41 | +#ifndef isgreaterequal | |
42 | +#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y) | |
43 | +#endif | |
44 | +#ifndef isless | |
45 | +#define isless(x, y) __builtin_isless(x, y) | |
46 | +#endif | |
47 | +#ifndef islessequal | |
48 | +#define islessequal(x, y) __builtin_islessequal(x, y) | |
49 | +#endif | |
50 | +#ifndef isunordered | |
51 | +#define isunordered(x, y) __builtin_isunordered(x, y) | |
52 | +#endif | |
53 | +#endif | |
54 | + | |
55 | + | |
38 | 56 | #define isnormal(x) (fpclass(x) >= FP_NZERO) |
39 | 57 | #define isgreater(x, y) ((!unordered(x, y)) && ((x) > (y))) |
40 | 58 | #define isgreaterequal(x, y) ((!unordered(x, y)) && ((x) >= (y))) | ... | ... |