Solaris port (Ben Taylor)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1888 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
e035649ea3
commit
38cfa06cbd
7
configure
vendored
7
configure
vendored
@ -148,9 +148,6 @@ if [ "$solaris" = "yes" ] ; then
|
|||||||
make="gmake"
|
make="gmake"
|
||||||
install="ginstall"
|
install="ginstall"
|
||||||
solarisrev=`uname -r | cut -f2 -d.`
|
solarisrev=`uname -r | cut -f2 -d.`
|
||||||
if test $solarisrev -lt 10 ; then
|
|
||||||
presolaris10="yes"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# find source path
|
# find source path
|
||||||
@ -640,9 +637,7 @@ if test "$darwin" = "yes" ; then
|
|||||||
fi
|
fi
|
||||||
if test "$solaris" = "yes" ; then
|
if test "$solaris" = "yes" ; then
|
||||||
echo "CONFIG_SOLARIS=yes" >> $config_mak
|
echo "CONFIG_SOLARIS=yes" >> $config_mak
|
||||||
if test "$presolaris10" = "yes" ; then
|
echo "#define HOST_SOLARIS $solarisrev" >> $config_h
|
||||||
echo "#define _PRESOLARIS10 1" >> $config_h
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
if test "$gdbstub" = "yes" ; then
|
if test "$gdbstub" = "yes" ; then
|
||||||
echo "CONFIG_GDBSTUB=yes" >> $config_mak
|
echo "CONFIG_GDBSTUB=yes" >> $config_mak
|
||||||
|
@ -1,11 +1,36 @@
|
|||||||
/* Native implementation of soft float functions */
|
/* Native implementation of soft float functions */
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#if defined(_BSD) && !defined(__APPLE__)
|
|
||||||
|
#if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
|
||||||
#include <ieeefp.h>
|
#include <ieeefp.h>
|
||||||
|
#define fabsf(f) ((float)fabs(f))
|
||||||
#else
|
#else
|
||||||
#if !defined(_PRESOLARIS10)
|
|
||||||
#include <fenv.h>
|
#include <fenv.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Define some C99-7.12.3 classification macros and
|
||||||
|
* some C99-.12.4 for Solaris systems OS less than 10,
|
||||||
|
* or Solaris 10 systems running GCC 3.x or less.
|
||||||
|
* Solaris 10 with GCC4 does not need these macros as they
|
||||||
|
* are defined in <iso/math_c99.h> with a compiler directive
|
||||||
|
*/
|
||||||
|
#if defined(HOST_SOLARIS) && (( HOST_SOLARIS <= 9 ) || ( ( HOST_SOLARIS >= 10 ) && ( __GNUC__ <= 4) ))
|
||||||
|
/*
|
||||||
|
* C99 7.12.3 classification macros
|
||||||
|
* and
|
||||||
|
* C99 7.12.14 comparison macros
|
||||||
|
*
|
||||||
|
* ... do not work on Solaris 10 using GNU CC 3.4.x.
|
||||||
|
* Try to workaround the missing / broken C99 math macros.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#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)))
|
||||||
|
#define isless(x, y) ((!unordered(x, y)) && ((x) < (y)))
|
||||||
|
#define islessequal(x, y) ((!unordered(x, y)) && ((x) <= (y)))
|
||||||
|
#define isunordered(x,y) unordered(x, y)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef float float32;
|
typedef float float32;
|
||||||
@ -35,7 +60,7 @@ typedef union {
|
|||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
| Software IEC/IEEE floating-point rounding mode.
|
| Software IEC/IEEE floating-point rounding mode.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
#if defined(_BSD) && !defined(__APPLE__)
|
#if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
|
||||||
enum {
|
enum {
|
||||||
float_round_nearest_even = FP_RN,
|
float_round_nearest_even = FP_RN,
|
||||||
float_round_down = FP_RM,
|
float_round_down = FP_RM,
|
||||||
|
Loading…
Reference in New Issue
Block a user