From: Richard Henderson <richard.henderson@linaro.org>
To: Shivaprasad G Bhat <sbhat@linux.ibm.com>,
aurelien@aurel32.net, peter.maydell@linaro.org,
alex.bennee@linaro.org
Cc: qemu-devel@nongnu.org, vaibhav@linux.ibm.com
Subject: Re: [PATCH] softfloat: Fix the incorrect computation in float32_exp2()
Date: Thu, 4 May 2023 09:28:31 +0100 [thread overview]
Message-ID: <4b1639c5-de50-6b66-ed74-e95f05bea5af@linaro.org> (raw)
In-Reply-To: <7cdaacd3-8672-5895-08d4-39c6732b44b0@linux.ibm.com>
On 5/4/23 06:21, Shivaprasad G Bhat wrote:
> Hi Richard,
>
>
> On 5/3/23 01:11, Richard Henderson wrote:
>> On 5/2/23 16:25, Shivaprasad G Bhat wrote:
>>> The float32_exp2() is computing wrong exponent of 2.
>>> For example, with the following set of values {0.1, 2.0, 2.0, -1.0},
>>> the expected output would be {1.071773, 4.000000, 4.000000, 0.500000}.
>>> Instead, the function is computing {1.119102, 3.382044, 3.382044, -0.191022}
>>>
> <snip>
>>> his is because instead of the xnp which holds the numerator,
>>> parts_muladd is using the xp which is just 'x'. The commit '572c4d862ff2'
>>> refactored this function, and it seems mistakenly using xp instead of xnp.
>>>
>>> The patches fixes this possible typo.
>>>
>>> Fixes: 572c4d862ff2 "softfloat: Convert float32_exp2 to FloatParts"
>>> Partially-Resolves:https://gitlab.com/qemu-project/qemu/-/issues/1623
>>> Reported-By: Luca Barbato (https://gitlab.com/lu-zero)
>>> Signed-off-by: Shivaprasad G Bhat<sbhat@linux.ibm.com>
>>> Signed-off-by: Vaibhav Jain<vaibhat@linux.ibm.com>
>>> ---
>>> fpu/softfloat.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Whoops. Good catch.
>>
>
> If you are fine with the patch, could you fix the mail id for Vaibhav Jain as
>
> <vaibhav@linux.ibm.com> while pulling ?
Done. Queued to tcg-next.
r~
next prev parent reply other threads:[~2023-05-04 8:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-02 15:25 [PATCH] softfloat: Fix the incorrect computation in float32_exp2() Shivaprasad G Bhat
2023-05-02 19:41 ` Richard Henderson
2023-05-04 5:21 ` Shivaprasad G Bhat
2023-05-04 8:28 ` Richard Henderson [this message]
2023-05-04 13:32 ` Michael Tokarev
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=4b1639c5-de50-6b66-ed74-e95f05bea5af@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sbhat@linux.ibm.com \
--cc=vaibhav@linux.ibm.com \
/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).