On May 8, 2017, at 5:54 PM, Aurelien Jarno wrote:
On 2017-05-07 17:48, G 3 wrote:
I made a diagnostic program for the floating point unit. It will test
various PowerPC floating point instructions for compatibility with
the
PowerPC G3 processor. It was tested on a PowerPC G3 and G5 system.
The
results of the program in qemu-system-ppc were pretty bad. About
every
instruction tested is not implemented correctly.
I don't say that qemu-system-ppc is bug free, but this looks
suspicious
that about every instruction is buggy.
I really hope you don't think I'm blaming anyone. I'm only reporting
the results of the test.
Have you tried to run your
program on a real G3 or G5 system?
Yes. I made sure it ran on a real G3 and G5 system without problem
before testing it on QEMU. I suspect the Motorola designed G4
processor will not be compatible. I don't have a working G4 system to
verify this unfortunately.
[ snip ]
Here is the full test results after running this program in qemu-
system-ppc
with a Mac OS 10.4 guest:
fadd test failed
expected answer: 0x3ff3333333333334
actual answer: 0x8200400000000024
expected fpscr: 0x82064000
actual fpscr: 0x82004000
This looks highly suspicious that the actual answer match the expected
answer.
You can use this web page to find the decimal value: http://
www6.uniovi.es/~antonio/uned/ieee754/IEEE-754hex64.html
0x3ff3333333333334 = 1.2000000000000002
0x8200400000000024 = -4.8529708162167760e-299
The expected answer and actual answer are very far from each other.