[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Patch for qemu 0.8.1 missing match functions on Solaris 9
From: |
John Wehle |
Subject: |
[Qemu-devel] Patch for qemu 0.8.1 missing match functions on Solaris 9 |
Date: |
Wed, 31 May 2006 00:58:44 -0000 |
Qemu is attempting to use math functions which don't exist on Solaris 9.
Changes:
fpu/softfloat-native.c: Provide l and f flavors of rint and friends.
target-i386/exec.h: Don't replace sin and friends with the l flavors.
Lightly tested using Solaris 9 x86 and gcc 2.95.3.
Enjoy!
-- John Wehle (address@hidden)
---------------8<-----------------8<-------------------8<----------------
*** fpu/softfloat-native.c.ORIGINAL Wed May 3 16:32:58 2006
--- fpu/softfloat-native.c Fri May 26 20:16:07 2006
***************
*** 6,12 ****
void set_float_rounding_mode(int val STATUS_PARAM)
{
STATUS(float_rounding_mode) = val;
! #if defined(_BSD) && !defined(__APPLE__)
fpsetround(val);
#elif defined(__arm__)
/* nothing to do */
--- 6,12 ----
void set_float_rounding_mode(int val STATUS_PARAM)
{
STATUS(float_rounding_mode) = val;
! #if (defined(_BSD) && !defined(__APPLE__)) || (defined(HOST_SOLARIS) &&
HOST_SOLARIS < 10)
fpsetround(val);
#elif defined(__arm__)
/* nothing to do */
*************** void set_floatx80_rounding_precision(int
*** 22,30 ****
}
#endif
! #if defined(_BSD)
! #define lrint(d) ((long)rint(d))
! #define llrint(d) ((long long)rint(d))
#endif
#if defined(__powerpc__)
--- 22,40 ----
}
#endif
! #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))
! #define lrintl(d) ((int32_t)rint(d))
! #define llrintl(d) ((int64_t)rint(d))
! #define sqrtl(d) (sqrt(d))
! #define remainderl(da,db) (remainder(da,db))
! #define rintl(d) (rint(d))
#endif
#if defined(__powerpc__)
*** target-i386/exec.h.ORIGINAL Wed May 3 16:32:58 2006
--- target-i386/exec.h Fri May 26 20:07:50 2006
*************** static inline void stfl(target_ulong ptr
*** 268,273 ****
--- 268,274 ----
#define floatx_round_to_int floatx80_round_to_int
#define floatx_compare floatx80_compare
#define floatx_compare_quiet floatx80_compare_quiet
+ #if !(defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
#define sin sinl
#define cos cosl
#define sqrt sqrtl
*************** static inline void stfl(target_ulong ptr
*** 278,283 ****
--- 279,285 ----
#define floor floorl
#define ceil ceill
#define ldexp ldexpl
+ #endif
#else
#define floatx_to_int32 float64_to_int32
#define floatx_to_int64 float64_to_int64
*************** static inline void stfl(target_ulong ptr
*** 290,295 ****
--- 292,298 ----
#define floatx_compare_quiet float64_compare_quiet
#endif
+ #if !(defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
extern CPU86_LDouble sin(CPU86_LDouble x);
extern CPU86_LDouble cos(CPU86_LDouble x);
extern CPU86_LDouble sqrt(CPU86_LDouble x);
*************** extern CPU86_LDouble tan(CPU86_LDouble x
*** 299,304 ****
--- 302,308 ----
extern CPU86_LDouble atan2(CPU86_LDouble, CPU86_LDouble);
extern CPU86_LDouble floor(CPU86_LDouble x);
extern CPU86_LDouble ceil(CPU86_LDouble x);
+ #endif
#define RC_MASK 0xc00
#define RC_NEAR 0x000
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: address@hidden |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] Patch for qemu 0.8.1 missing match functions on Solaris 9,
John Wehle <=