Commit 57e4c06ed749e14c7c183996883dee27c23a0ade
1 parent
09d459a1
fscale fix (bug noticed by Kuwanger, fix by malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1528 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
2 additions
and
5 deletions
target-i386/exec.h
@@ -337,6 +337,7 @@ static inline void stfl(target_ulong ptr, float v) | @@ -337,6 +337,7 @@ static inline void stfl(target_ulong ptr, float v) | ||
337 | #define atan2 atan2l | 337 | #define atan2 atan2l |
338 | #define floor floorl | 338 | #define floor floorl |
339 | #define ceil ceill | 339 | #define ceil ceill |
340 | +#define ldexp ldexpl | ||
340 | #else | 341 | #else |
341 | #define floatx_to_int32 float64_to_int32 | 342 | #define floatx_to_int32 float64_to_int32 |
342 | #define floatx_to_int64 float64_to_int64 | 343 | #define floatx_to_int64 float64_to_int64 |
target-i386/helper.c
@@ -2888,11 +2888,7 @@ void helper_frndint(void) | @@ -2888,11 +2888,7 @@ void helper_frndint(void) | ||
2888 | 2888 | ||
2889 | void helper_fscale(void) | 2889 | void helper_fscale(void) |
2890 | { | 2890 | { |
2891 | - CPU86_LDouble fpsrcop, fptemp; | ||
2892 | - | ||
2893 | - fpsrcop = 2.0; | ||
2894 | - fptemp = pow(fpsrcop,ST1); | ||
2895 | - ST0 *= fptemp; | 2891 | + ST0 = ldexp (ST0, (int)(ST1)); |
2896 | } | 2892 | } |
2897 | 2893 | ||
2898 | void helper_fsin(void) | 2894 | void helper_fsin(void) |