diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-19 16:46:07 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-19 16:46:07 +0000 |
commit | 63a654bb39bd6d154a535c535190b1f3a9d27699 (patch) | |
tree | 749397af35d6b27b96ee2fa042fab6fb97aa9116 /fpu/softfloat-native.c | |
parent | Close file descriptors when execing network tap setup script, by (diff) | |
download | qemu-kvm-63a654bb39bd6d154a535c535190b1f3a9d27699.tar.gz qemu-kvm-63a654bb39bd6d154a535c535190b1f3a9d27699.tar.bz2 qemu-kvm-63a654bb39bd6d154a535c535190b1f3a9d27699.zip |
trunc() for Solaris 9 / SPARC, by Juergen Keil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2508 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'fpu/softfloat-native.c')
-rw-r--r-- | fpu/softfloat-native.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fpu/softfloat-native.c b/fpu/softfloat-native.c index f20d5c45f..7b28a4cfe 100644 --- a/fpu/softfloat-native.c +++ b/fpu/softfloat-native.c @@ -221,6 +221,12 @@ float128 float64_to_float128( float64 a STATUS_PARAM) /*---------------------------------------------------------------------------- | Software IEC/IEEE double-precision operations. *----------------------------------------------------------------------------*/ +#if ( defined(__sun__) && ( HOST_SOLARIS < 10 )) +static inline float64 trunc(float64 x) +{ + return x < 0 ? -floor(-x) : floor(x); +} +#endif float64 float64_trunc_to_int( float64 a STATUS_PARAM ) { return trunc(a); |