qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] x86 FPU Emulation,


From: The Qube
Subject: Re: [Qemu-devel] x86 FPU Emulation,
Date: Tue, 19 Jul 2005 12:24:15 -0700

Okay, I figured out the problem. fscale should be defined as ST0*(2^int(ST1)). Here's the patch malc created, using ldexp:

diff -u -u -r1.49 helper.c
--- target-i386/helper.c        24 Apr 2005 18:04:33 -0000      1.49
+++ target-i386/helper.c        19 Jul 2005 19:00:16 -0000
@@ -2832,11 +2832,7 @@

void helper_fscale(void)
{
-    CPU86_LDouble fpsrcop, fptemp;
-
-    fpsrcop = 2.0;
-    fptemp = pow(fpsrcop,ST1);
-    ST0 *= fptemp;
+    ST0 = ldexp (ST0, ST1);
}

void helper_fsin(void)

Both me and malc have verified that it corrects the problem with calc387.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]