qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Floating point unit bugs


From: Aurelien Jarno
Subject: Re: [Qemu-devel] Floating point unit bugs
Date: Mon, 8 May 2017 23:54:12 +0200
User-agent: NeoMutt/20170113 (1.7.2)

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. Have you tried to run your
program on a real G3 or G5 system?

[ 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.

> actual FPSCR bits set:
> bit 17: FPRF - Floating-point greater than or positive
> bit 6: XX - Floating-point inexact exception
> bit 0: FX - Floating-point exception summary
> 
> expected FPSCR bits set:
> bit 17: FPRF - Floating-point greater than or positive
> bit 14: FI - Floating-point fraction inexact
> bit 13: FR - Floating-point fraction rounded
> bit 6: XX - Floating-point inexact exception
> bit 0: FX - Floating-point exception summary
> 
> fadds test failed
> expected answer: 0x407024d500000000
>   actual answer: 0x8200400000000024
> expected fpscr: 0x82064000
>   actual fpscr: 0x82004000

Ditto.

> actual FPSCR bits set:
> bit 17: FPRF - Floating-point greater than or positive
> bit 6: XX - Floating-point inexact exception
> bit 0: FX - Floating-point exception summary
> 
> expected FPSCR bits set:
> bit 17: FPRF - Floating-point greater than or positive
> bit 14: FI - Floating-point fraction inexact
> bit 13: FR - Floating-point fraction rounded
> bit 6: XX - Floating-point inexact exception
> bit 0: FX - Floating-point exception summary
> 
> fsub test passed
> fsubs test passed
> fmul test failed
> expected answer: 0x40365c28f5c28f5c
>   actual answer: 0x8200400000000024
> expected fpscr: 0x82024000
>   actual fpscr: 0x82004000

Ditto.

> actual FPSCR bits set:
> bit 17: FPRF - Floating-point greater than or positive
> bit 6: XX - Floating-point inexact exception
> bit 0: FX - Floating-point exception summary
> 
> expected FPSCR bits set:
> bit 17: FPRF - Floating-point greater than or positive
> bit 14: FI - Floating-point fraction inexact
> bit 6: XX - Floating-point inexact exception
> bit 0: FX - Floating-point exception summary
> 
> fmuls test failed
> expected answer: 0x412135a4a0000000
>   actual answer: 0x8200400000000024
> expected fpscr: 0x82024000
>   actual fpscr: 0x82004000
> 
> actual FPSCR bits set:
> bit 17: FPRF - Floating-point greater than or positive
> bit 6: XX - Floating-point inexact exception
> bit 0: FX - Floating-point exception summary
> 
> expected FPSCR bits set:
> bit 17: FPRF - Floating-point greater than or positive
> bit 14: FI - Floating-point fraction inexact
> bit 6: XX - Floating-point inexact exception
> bit 0: FX - Floating-point exception summary
> 
> fdiv test failed
> expected answer: 0x40059f38ee13b48b
>   actual answer: 0x8200400000000024
> expected fpscr: 0x82064000
>   actual fpscr: 0x82004000

Ditto.

And so on...

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
address@hidden                 http://www.aurel32.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]