qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Programmingkid <programmingkidx@gmail.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: David Gibson <david@gibson.dropbear.id.au>,
	Peter Maydell <peter.maydell@linaro.org>,
	"list@suse.de:PowerPC list:PowerPC" <qemu-ppc@nongnu.org>,
	qemu-devel qemu-devel <qemu-devel@nongnu.org>
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	[thread overview]
Message-ID: <9E802039-CDBF-4E1A-AC67-2A6B195FABBF@gmail.com> (raw)
In-Reply-To: <87twcyuye9.fsf@linaro.org>


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

> 
> Programmingkid <programmingkidx@gmail.com> writes:
> 
>> On Sep 29, 2016, at 2:19 PM, Alex Bennée wrote:
>> 
>>> 
>>> Programmingkid <programmingkidx@gmail.com> 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 <programmingkidx@gmail.com> 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	other threads:[~2016-09-29 22:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-27  1:05 [Qemu-devel] How to add my implementation of the fmadds instruction to QEMU G 3
2016-09-27  3:41 ` [Qemu-devel] [Qemu-ppc] " David Gibson
2016-09-27 11:43 ` [Qemu-devel] " Peter Maydell
2016-09-27 14:33   ` G 3
2016-09-27 15:21     ` Peter Maydell
2016-09-27 16:16     ` Eric Blake
2016-09-27 16:51       ` G 3
2016-09-27 16:58         ` Peter Maydell
2016-09-29  4:17           ` [Qemu-devel] [Qemu-ppc] " David Gibson
2016-09-29 15:20             ` Programmingkid
2016-09-29 18:19               ` Alex Bennée
2016-09-29 21:52                 ` Programmingkid
2016-09-29 22:36                   ` Alex Bennée
2016-09-29 22:39                     ` Programmingkid [this message]
2016-09-29 15:41             ` Peter Maydell
2016-09-29 16:55               ` Programmingkid
2016-09-30  0:39                 ` David Gibson
2016-09-30  0:44                   ` Programmingkid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9E802039-CDBF-4E1A-AC67-2A6B195FABBF@gmail.com \
    --to=programmingkidx@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).