From: Aurelien Jarno <aurelien@aurel32.net>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/5] softfloat: fix float{32, 64}_muladd options
Date: Sun, 9 Sep 2012 11:24:13 +0200 [thread overview]
Message-ID: <20120909092413.GQ6791@ohm.aurel32.net> (raw)
In-Reply-To: <CAMo8BfJ3MGoXS5NdX1-f4V1AtE89joTT0Y9X9tuvmCcbQZ=jjg@mail.gmail.com>
On Sun, Sep 09, 2012 at 01:40:52AM +0400, Max Filippov wrote:
> On Sun, Sep 9, 2012 at 1:12 AM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > float{32,64}_muladd takes an enum as a parameter, and not flags. It
> > means the parameter should be checked with == test instead of &.
> >
> > Cc: Peter Maydell <peter.maydell@linaro.org>
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > ---
>
> Hi Aurelien,
>
> I've also stumbled upon this bug, have a patch for it in the xtensa tree.
> I guess that the interface was designed to allow combining these flags, why
> don't just make them independent:
My idea was that negating both the product and c is equivalent to
negating the result, so there is no need to allow all of them
independent.
> diff --git a/fpu/softfloat.h b/fpu/softfloat.h
> index feec3a1..2860ca0 100644
> --- a/fpu/softfloat.h
> +++ b/fpu/softfloat.h
> @@ -219,7 +219,7 @@ void float_raise( int8 flags STATUS_PARAM);
> enum {
> float_muladd_negate_c = 1,
> float_muladd_negate_product = 2,
> - float_muladd_negate_result = 3,
> + float_muladd_negate_result = 4,
> };
>
> /*----------------------------------------------------------------------------
That said your solution is also fine, it just allow multiple way to do
the same thing.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2012-09-09 9:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-08 21:12 [Qemu-devel] [PATCH 1/5] softfloat: fix float{32, 64}_muladd options Aurelien Jarno
2012-09-08 21:12 ` [Qemu-devel] [PATCH 2/5] target-ppc: simplify NaN propagation for vector functions Aurelien Jarno
2012-09-08 21:12 ` [Qemu-devel] [PATCH 3/5] target-ppc: use the softfloat min/max functions Aurelien Jarno
2012-09-08 21:12 ` [Qemu-devel] [PATCH 4/5] target-ppc: use the softfloat float32_muladd function Aurelien Jarno
2012-09-09 9:51 ` Peter Maydell
2012-09-09 10:03 ` Aurelien Jarno
2012-09-08 21:12 ` [Qemu-devel] [PATCH 5/5] target-ppc: get rid of the HANDLE_NAN{1, 2, 3} macros Aurelien Jarno
2012-09-08 22:40 ` Peter Maydell
2012-09-08 21:40 ` [Qemu-devel] [PATCH 1/5] softfloat: fix float{32, 64}_muladd options Max Filippov
2012-09-08 22:29 ` Peter Maydell
2012-09-09 9:24 ` Aurelien Jarno [this message]
2012-09-09 9:47 ` Peter Maydell
2012-09-09 10:04 ` Aurelien Jarno
2012-09-09 10:25 ` Peter Maydell
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=20120909092413.GQ6791@ohm.aurel32.net \
--to=aurelien@aurel32.net \
--cc=jcmvbkbc@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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).