From: Thomas Huth <thuth@redhat.com>
To: "Aurelien Jarno" <aurelien@aurel32.net>,
"Alex Bennée" <alex.bennee@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel <qemu-devel@nongnu.org>,
Aleksandar Markovic <aleksandar.markovic@imgtec.com>,
Bharata B Rao <bharata@linux.vnet.ibm.com>,
Pranith Kumar <bobby.prani@gmail.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] Future of SoftFloat use in QEMU
Date: Mon, 8 May 2017 17:58:03 +0200 [thread overview]
Message-ID: <addc4f06-5554-0a8c-b651-3c921a148bfb@redhat.com> (raw)
In-Reply-To: <20170508153625.y7jhzv32go5fzlwh@aurel32.net>
On 08.05.2017 17:36, Aurelien Jarno wrote:
> Hi,
>
> On 2017-05-08 15:58, Alex Bennée wrote:
>> Hi,
>>
>> We've got a task coming up to implement half-precision floating point
>> (FP16) for ARMv8.2. As you know pretty much all our floating point in
>> QEMU is handled by our internal fork of John R. Hauser's BSD SoftFloat
>> library. Our current implementation is based on version 2a which doesn't
>> support FP16.
>>
>> As it happens there has been a new release of SoftFloat recently.
>> Version 3 is a complete re-write which made a number of changes, some
>> notable ones being:
>>
>> - Complete rewrite, different use license than earlier releases.
>> - Renaming most types and functions, upgrading some algorithms
>> - restructuring the source files, and making SoftFloat into a true library.
>> - Added functions to convert between floating-point and unsigned integers, both 32-bit and 64-bit (uint32_t and uint64_t).
>> - Added functions for fused multiply-add, for all supported floating-point formats except 80-bit double-extended-precision.
>> - Added support for a fifth rounding mode, near_maxMag (round to nearest, with ties to maximum magnitude, away from zero).
>>
>> And in the most recent release as of February 2017, 3c:
>>
>> - Added optional rounding mode odd (round to odd, also known as jamming).
>> - Implemented the common 16-bit “half-precision” floating-point format (float16_t)
>>
>> See: http://www.jhauser.us/arithmetic/SoftFloat-3c/doc/SoftFloat-history.html
>>
>> Of course the softfloat in QEMU's tree hasn't been static either. We've
>> made numerous changes over the years to add and fix various features,
>> including features that have since been added to the upstream softfloat.
>> It seems unlikely we could switch to the newer softfloat without risking
>> breaking something. However if we look at back-porting stuff from the
>> newer library we essentially get to own our version of softfloat
>> forever.
>
> There have been many many changes in our forked version of softfloat:
> qNaN/sNaN, IEEE754-2008 functions, squash input denormal, many floatx80
> fixes, ...
Note that we've apparently also got plenty of bugs in our version of
softloat left, for example:
- https://bugs.launchpad.net/qemu/+bug/645662
- http://lists.nongnu.org/archive/html/qemu-ppc/2017-05/msg00187.html
... would be interesting to know whether such issues are fixed with the
newer version of softfloat...
Thomas
next prev parent reply other threads:[~2017-05-08 15:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-08 14:58 [Qemu-devel] Future of SoftFloat use in QEMU Alex Bennée
2017-05-08 15:13 ` Eric Blake
2017-05-08 15:36 ` Aurelien Jarno
2017-05-08 15:58 ` Thomas Huth [this message]
2017-05-08 21:45 ` Aurelien Jarno
2017-05-08 15:46 ` Daniel P. Berrange
2017-05-09 1:56 ` Richard Henderson
2017-05-30 9:40 ` Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2017-05-11 13:01 G 3
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=addc4f06-5554-0a8c-b651-3c921a148bfb@redhat.com \
--to=thuth@redhat.com \
--cc=aleksandar.markovic@imgtec.com \
--cc=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=bharata@linux.vnet.ibm.com \
--cc=bobby.prani@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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).