diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-06-14 17:32:25 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-06-14 17:32:25 +0000 |
commit | fdbb46910a2033bd748681346d4261725f5e184b (patch) | |
tree | 366d6f921fbca0bbfd6afa63078bd91716d1aff3 /fpu | |
parent | 43057ab1272ba2b9b052b19a3453fb0f3b510149 (diff) | |
download | qemu-fdbb46910a2033bd748681346d4261725f5e184b.zip qemu-fdbb46910a2033bd748681346d4261725f5e184b.tar.gz qemu-fdbb46910a2033bd748681346d4261725f5e184b.tar.bz2 |
Solaris/SPARC host port (Ben Taylor)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1979 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'fpu')
-rw-r--r-- | fpu/softfloat-native.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fpu/softfloat-native.c b/fpu/softfloat-native.c index e548202..bbdb3d6 100644 --- a/fpu/softfloat-native.c +++ b/fpu/softfloat-native.c @@ -6,7 +6,7 @@ void set_float_rounding_mode(int val STATUS_PARAM) { STATUS(float_rounding_mode) = val; -#if defined(_BSD) && !defined(__APPLE__) +#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) fpsetround(val); #elif defined(__arm__) /* nothing to do */ @@ -22,9 +22,14 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) } #endif -#if defined(_BSD) -#define lrint(d) ((long)rint(d)) -#define llrint(d) ((long long)rint(d)) +#if defined(_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) +#define lrint(d) ((int32_t)rint(d)) +#define llrint(d) ((int64_t)rint(d)) +#define lrintf(f) ((int32_t)rint(f)) +#define llrintf(f) ((int64_t)rint(f)) +#define sqrtf(f) ((float)sqrt(f)) +#define remainderf(fa, fb) ((float)remainder(fa, fb)) +#define rintf(f) ((float)rint(f)) #endif #if defined(__powerpc__) |