Aaaa, now I understand everything !
I bet on Windows host you have gcc 3.x, right ?
Throw away gcc version 4, or may be even better open a bug report for it.
It generates wrong code causing wrong results, we already similar issue
before, you could refer another bug report as example.
I also seen the same complains in QEMU forum. Replace gcc with older version
and it will work fine under any host.
P.S> It would be interesting to see what is the difference between gcc 3.x
compiled Bochs FPU and gcc 4.x compiled ... wondering what is the reason for
the problem ...
From: Volker Ruppert [mailto:info@...]
Sent: Thursday, September 13, 2007 9:17 PM
Subject: Re: [Bochs-developers] FPU type detection
> Just tested on Linux host:
> > uname -a
> Linux 2.6.5-7.276.PTF.196309.1-bigsmp #1 SMP Mon Jul 24 10:45:31 UTC 2006
> i686 i386 GNU/Linux
> uname -a
Linux 22.214.171.124-0.5-default #1 SMP Fri Jun 22 12:17:53 UTC 2007 i686 athlon
> gcc --version
gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux)
Copyright (C) 2006 Free Software Foundation, Inc.
> The result is the same, 387/487 FPU. Which host do you try?
> Could you trace your testcase with debugger starting from FINIT and till
> the test decided?
> Just do 'step' and 'info fpu' after the test begun and send me the output.
In the meantime I did some different tests by adding BX_INFOs and printf's
Status before FDIV: 0000
Windows status after FDIV: 0004
Linux status after FDIV: 0001
The exponent of argument 'a' is different after reading from FPU register