qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-ppc] How to add my implementation of the fmadds i


From: Programmingkid
Subject: Re: [Qemu-devel] [Qemu-ppc] How to add my implementation of the fmadds instruction to QEMU
Date: Thu, 29 Sep 2016 18:39:32 -0400

On Sep 29, 2016, at 6:36 PM, Alex Bennée wrote:

> 
> Programmingkid <address@hidden> writes:
> 
>> On Sep 29, 2016, at 2:19 PM, Alex Bennée wrote:
>> 
>>> 
>>> Programmingkid <address@hidden> writes:
>>> 
>>>> On Sep 29, 2016, at 12:17 AM, David Gibson wrote:
>>>> 
>>>>> On Tue, Sep 27, 2016 at 09:58:02AM -0700, Peter Maydell wrote:
>>>>>> On 27 September 2016 at 09:51, G 3 <address@hidden> wrote:
>>>>>>> The problem with your reasoning is you assume this instruction has to be
>>>>>>> 100% correctly implemented. That every single "corner-case" has to be
>>>>>>> accounted for.
>>>>>> 
>>>>>> For upstream QEMU we've already made this design decision --
>>>>>> emulation accuracy comes first, and speed is secondary.
>>>>>> That's why we implement this the way we do.
>>>>> 
>>>>> I think there is a way you could get both speed and accuracy, but it's
>>>>> a huge project:
>>>>> 
>>>>> You'd need to add full float awareness to TCG - so floating point TCG
>>>>> values and floating point operations as tcp micro-ops, defined
>>>>> according to IEEE semantics.  Then you'd need to rewrite the TCG
>>>>> frontends in terms of those new ops, at least for target CPUs close
>>>>> enough to IEEE semantics for that to work.  And you'd need to rewrite
>>>>> the TCG backends to implement those fp ops in terms of host cpu fp
>>>>> instructions .. at least when the host has fp behaviour close enough
>>>>> to IEEE to make that work, with a fallback to soft float when that's
>>>>> not the case.
>>>> 
>>>> Interesting idea. Do you think we would see a large enough increase in 
>>>> speed
>>>> to justify this project?
>>> 
>>> It really depends on workload. If you want to run lots of encoding/audio
>>> workloads in TCG guests it is certainly something that could be
>>> improved.
>>> 
>>> As others have pointed out however it is a fairly big project.
>>> 
>>> --
>>> Alex Bennée
>> 
>> Alex Bennée? I was just watching your KVM video about MTTCG! Small world.
>> 
>> I so want audio to play correctly in a PowerPC Mac OS guest. So this
>> project might be necessary.
>> 
>> If it is a fairly big project, then I will need to map it out some more.
>> I've made a mind map of what I know so far. It is attached to this email.
>> Let me know if you can think of anything to add.
>> 
>> http://i.imgur.com/MYkiKGx.png
> 
> While I appreciate your target is PPC I think if you are going to
> suggest any core floating point TCGOps you will need to survey the
> behaviour of the FPUs on all (or at least the most common) TCG targets
> and go for instructions that behave the same across a broad range of
> targets.
> 
> I think if we were to introduce this into the code base we would need to
> have a decent range of test cases. I'm talking about making sure we
> exercise the whole range of behaviour:
> 
>  - min/max rounding behaviour
>  - handling of denormalisation
>  - signalling and non-signalling NaN behaviour
>  - exception generation
> 
> Testing is going to be very important for confidence.

Thank you very much for this list. I will see what I can come up with.




reply via email to

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