Skip to contentSkip to conversation

x86 FPU Emulation,

Qemu-devel The Qube 1 participant 1 message Jul 19, 2005

lore
Share & tools
lore

The Qube

author
#0 lore raw

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

helper.c 19 Jul 2005 19:00:16 -0000 renamed from helper.c 24 Apr 2005 18:04:33 -0000 1.49 +0 -0
diff -u -u -r1.49 helper.c
@@ -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.