diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-01 18:54:44 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-01 18:54:44 +0000 |
commit | 0475a5ca544e3a59fb961f14342228aad1d0acb6 (patch) | |
tree | 5ce0f16b14dad1600cb87c6760b95a6e34e33d16 /fpu | |
parent | e5febef5f1811dfd59aa197aad83e96db26a9516 (diff) | |
download | qemu-0475a5ca544e3a59fb961f14342228aad1d0acb6.tar.gz qemu-0475a5ca544e3a59fb961f14342228aad1d0acb6.tar.bz2 qemu-0475a5ca544e3a59fb961f14342228aad1d0acb6.zip |
Solaris 9/x86 support, by Ben Taylor.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2577 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'fpu')
-rw-r--r-- | fpu/softfloat-native.c | 19 | ||||
-rw-r--r-- | fpu/softfloat.h | 4 |
2 files changed, 23 insertions, 0 deletions
diff --git a/fpu/softfloat-native.c b/fpu/softfloat-native.c index c629926f88..d827ae6fec 100644 --- a/fpu/softfloat-native.c +++ b/fpu/softfloat-native.c @@ -30,6 +30,25 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) #define sqrtf(f) ((float)sqrt(f)) #define remainderf(fa, fb) ((float)remainder(fa, fb)) #define rintf(f) ((float)rint(f)) +#if !defined(__sparc__) && HOST_SOLARIS < 10 +extern long double rintl(long double); +extern long double scalbnl(long double, int); + +long long +llrintl(long double x) { + return ((long long) rintl(x)); +} + +long +lrintl(long double x) { + return ((long) rintl(x)); +} + +long double +ldexpl(long double x, int n) { + return (scalbnl(x, n)); +} +#endif #endif #if defined(__powerpc__) diff --git a/fpu/softfloat.h b/fpu/softfloat.h index 00ec56b056..21100c0d06 100644 --- a/fpu/softfloat.h +++ b/fpu/softfloat.h @@ -32,6 +32,10 @@ these four paragraphs for those parts of this code that are retained. #ifndef SOFTFLOAT_H #define SOFTFLOAT_H +#if defined(HOST_SOLARIS) && defined(NEEDS_LIBSUNMATH) +#include <sunmath.h> +#endif + #include <inttypes.h> #include "config.h" |