[Top][All Lists]

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

Re: [Qemu-ppc] PPC hardfloat

From: BALATON Zoltan
Subject: Re: [Qemu-ppc] PPC hardfloat
Date: Tue, 27 Aug 2019 12:45:05 +0200 (CEST)
User-agent: Alpine 2.21.9999 (BSF 287 2018-06-16)

On Mon, 26 Aug 2019, Paul Clarke wrote:
On 8/26/19 5:30 PM, Richard Henderson wrote:
On 8/26/19 1:28 PM, BALATON Zoltan wrote:
On Mon, 26 Aug 2019, Richard Henderson wrote:
That said, qemu-system-ppc64 will *never* use hardfloat, because ppc always
need the current and correct result of inexact for emulation of the FI bit,
which requires that we use the softfloat path.

That's bad news. I hoped that hardfloat for PPC can be implemented and
previously it was thought it could be done after some reorganisation to prevent
always reseting flags by moving them to environment or somewhere else (but I
don't remember the details and maybe I never fully understood it in the first
place). Could you please explain why do you think it's not possible?

We only use hardfloat if we do not need to compute whether the current
operation produces an inexact exception.  We need not care when the sticky
inexact bit is already set.

However, for ppc, the FPSCR[FI] bit indicates whether the previous fp operation
was inexact.  Thus we need to compute the inexact exception for every single

I still don't get it but I'm obviously missing knowledge about how it should work. Is there any good short introduction that I should read about it? I've found this:


but haven't read everything. Why is it not enough to clear host inexact bit before FP op then update emulated bit based on what hardware signalled? Does the PPC FI bit behave differently than corresponding bit on other implementations? Or is reading flags at every FP op too expensive? (I'd expect that to be still faster than emulating all FP in software.)

Is there a way tell qemu "I don't care about FPSCR[FI], so use hardfloat" ?
If not, should there be?

That's also a possibility (likely most guest code ignores it anyway) however currently hardfloat is completely disabled for PPC so not sure if that's the only reason it's not used yet.


reply via email to

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