From 128ab2ff50a85969d08d2dec0fd88accdd153bcb Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Fri, 15 Aug 2008 18:33:42 +0000 Subject: Preliminary OpenBSD host support (based on OpenBSD patches by Todd T. Fries) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5012 c046a42c-6fe2-441c-8c8c-71466251a162 --- fpu/softfloat-native.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'fpu') diff --git a/fpu/softfloat-native.h b/fpu/softfloat-native.h index 53bf68192..5994cd473 100644 --- a/fpu/softfloat-native.h +++ b/fpu/softfloat-native.h @@ -15,7 +15,9 @@ * Solaris 10 with GCC4 does not need these macros as they * are defined in with a compiler directive */ -#if defined(HOST_SOLARIS) && (( HOST_SOLARIS <= 9 ) || ((HOST_SOLARIS >= 10) && (__GNUC__ <= 4))) +#if defined(HOST_SOLARIS) && (( HOST_SOLARIS <= 9 ) || ((HOST_SOLARIS >= 10) \ + && (__GNUC__ <= 4))) \ + || defined(__OpenBSD__) /* * C99 7.12.3 classification macros * and @@ -24,6 +26,9 @@ * ... do not work on Solaris 10 using GNU CC 3.4.x. * Try to workaround the missing / broken C99 math macros. */ +#if defined(__OpenBSD__) +#define unordered(x, y) (isnan(x) || isnan(y)) +#endif #define isnormal(x) (fpclass(x) >= FP_NZERO) #define isgreater(x, y) ((!unordered(x, y)) && ((x) > (y))) @@ -84,6 +89,11 @@ typedef union { | Software IEC/IEEE floating-point rounding mode. *----------------------------------------------------------------------------*/ #if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS) +#if defined(__OpenBSD__) +#define FE_RM FP_RM +#define FE_RP FP_RP +#define FE_RZ FP_RZ +#endif enum { float_round_nearest_even = FP_RN, float_round_down = FP_RM, -- cgit v1.2.3-65-gdbad