From: bellard Date: Sun, 24 Jul 2005 14:33:17 +0000 (+0000) Subject: fscale fix (bug noticed by Kuwanger, fix by malc) X-Git-Tag: release_0_7_1~6 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=113e2c362ac2fc648b02ad54fab1aabb24ad1f8a;p=qemu-xen-4.4-testing.git fscale fix (bug noticed by Kuwanger, fix by malc) --- diff --git a/target-i386/exec.h b/target-i386/exec.h index a3bbea999..b1145017d 100644 --- a/target-i386/exec.h +++ b/target-i386/exec.h @@ -337,6 +337,7 @@ static inline void stfl(target_ulong ptr, float v) #define atan2 atan2l #define floor floorl #define ceil ceill +#define ldexp ldexpl #else #define floatx_to_int32 float64_to_int32 #define floatx_to_int64 float64_to_int64 diff --git a/target-i386/helper.c b/target-i386/helper.c index c83dbf219..01b663f38 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -2888,11 +2888,7 @@ void helper_frndint(void) void helper_fscale(void) { - CPU86_LDouble fpsrcop, fptemp; - - fpsrcop = 2.0; - fptemp = pow(fpsrcop,ST1); - ST0 *= fptemp; + ST0 = ldexp (ST0, (int)(ST1)); } void helper_fsin(void)