x86 FPU Emulation,
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
@@ -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.