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.c24 Apr 2005 18:04:33 - 1.49
+++ target-i386/helper.c19 Jul 2005 19:00:16 -
@@ -2832,11 +283
Using any DOS/DOS-like setup under qemu x86 (no kqemu/qvm86) and running
calc387 will produce non-sane results. For example, "calc387 2^4" produces
17.7635. "calc387 4^2" produces 17.7635 as well. I've verified this is not
an issue with calc387 by running the above two calculations under dos