From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
nikunj@linux.vnet.ibm.com, david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH] target-ppc: Add quad precision muladd instructions
Date: Thu, 16 Feb 2017 08:11:26 +0530 [thread overview]
Message-ID: <20170216024126.GA17196@in.ibm.com> (raw)
In-Reply-To: <44595100-389c-18ee-6355-2d1355577187@twiddle.net>
On Thu, Feb 16, 2017 at 09:13:31AM +1100, Richard Henderson wrote:
> On 02/15/2017 05:37 PM, Bharata B Rao wrote:
> > + *
> > + * TODO: When float128_muladd() becomes available, switch this
> > + * implementation to use that instead of separate float128_mul()
> > + * followed by float128_add().
>
> Let's just do that, rather than add something that can't pass tests.
>
> You should be able to copy float64_muladd and, for the most part, s/128/256/
> and s/64/128/. Other of the magic numbers, like the implicit bit and the
> exponent bias, you get from float128_mul.
I started like that but got lost somewhere down that path...
It needs at least the following new functions to be implemented:
propagateFloat128MulAddNaN
shortShift256Left
shift256RightJamming
add256
sub256
It all looked doable, but the magic numbers used around the code that
does eventual multiplication looked difficult to understand and I couldn't
deduce that from float128_mul. For some reason float128_mul implements
multipliction via multiplication and addition (mul128To256 & add128). There
is no equivalent to this in float64_muladd.
Let me make another attempt at this.
Regards,
Bharata.
next prev parent reply other threads:[~2017-02-16 2:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 6:37 [Qemu-devel] [PATCH] target-ppc: Add quad precision muladd instructions Bharata B Rao
2017-02-15 22:13 ` Richard Henderson
2017-02-16 2:41 ` Bharata B Rao [this message]
2017-02-16 20:53 ` Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2020-09-22 8:04 David Hildenbrand
2020-09-22 9:22 ` Bharata B Rao
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=20170216024126.GA17196@in.ibm.com \
--to=bharata@linux.vnet.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=nikunj@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/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).