qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org, bharata@linux.ibm.com
Subject: Re: [PATCH 6/8] softfloat: Implement float128_muladd
Date: Fri, 25 Sep 2020 11:17:28 +0200	[thread overview]
Message-ID: <9ced60b8-41d3-5c81-cbe8-92f219ba6978@redhat.com> (raw)
In-Reply-To: <ad092b60-dd41-33f0-9530-75fba4309c3c@linaro.org>

On 24.09.20 15:30, Richard Henderson wrote:
> On 9/24/20 12:56 AM, David Hildenbrand wrote:
>> I do wonder if a type for Int256 would make sense - instead of > manually passing these arrays.
> 
> I could do that.  It does name better, I suppose, in passing.  So long as
> you're happy having the guts of the type be public, and not wrapping everything
> like we do for Int128...

We can do that once we have hardware+compiler support for 256bit ;)

> 
> Either is better than the softfloat style, which would pass 12 arguments to
> these helpers... ;-)

Indeed

> 
>>> +static void shortShift256Left(uint64_t p[4], unsigned count)
>>> +{
>>> +    int negcount = -count & 63;
>>
>> That's the same as "64 - count", right? (which I find easier to get)
> 
> In this case, yes.
> 
> Of course, more hosts have a "neg" instruction than they do a
> "subtract-from-immediate" instruction.  When the shift instruction only
> examines the low N bits, the "& 63" is optimized away, so this can result in 1
> fewer instruction in the end.
> 
> Which is why I almost always use this form, and it's already all over the code
> inherited from upstream.
> 
>> Wow, that's a beast :)
> 
> But not much worse than muladd_floats(), I'm pleased to say.

Definitely!


-- 
Thanks,

David / dhildenb



  reply	other threads:[~2020-09-25  9:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24  1:24 [PATCH 0/8] softfloat: Implement float128_muladd Richard Henderson
2020-09-24  1:24 ` [PATCH 1/8] softfloat: Use mulu64 for mul64To128 Richard Henderson
2020-09-24  7:32   ` David Hildenbrand
2020-09-24  1:24 ` [PATCH 2/8] softfloat: Use int128.h for some operations Richard Henderson
2020-09-24  7:35   ` David Hildenbrand
2020-09-24  1:24 ` [PATCH 3/8] softfloat: Tidy a * b + inf return Richard Henderson
2020-09-24  7:37   ` David Hildenbrand
2020-09-24  1:24 ` [PATCH 4/8] softfloat: Add float_cmask and constants Richard Henderson
2020-09-24  7:40   ` David Hildenbrand
2020-09-24  1:24 ` [PATCH 5/8] softfloat: Inline pick_nan_muladd into its caller Richard Henderson
2020-09-24  7:42   ` David Hildenbrand
2020-09-24  1:24 ` [PATCH 6/8] softfloat: Implement float128_muladd Richard Henderson
2020-09-24  7:56   ` David Hildenbrand
2020-09-24 13:30     ` Richard Henderson
2020-09-25  9:17       ` David Hildenbrand [this message]
2020-09-24  1:24 ` [PATCH 7/8] softfloat: Use x86_64 assembly for {add,sub}{192,256} Richard Henderson
2020-09-24  1:24 ` [PATCH 8/8] softfloat: Use aarch64 " Richard Henderson
2020-09-24  8:00 ` [PATCH 0/8] softfloat: Implement float128_muladd David Hildenbrand

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=9ced60b8-41d3-5c81-cbe8-92f219ba6978@redhat.com \
    --to=david@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=bharata@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).