From: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "alex.bennee@linaro.org" <alex.bennee@linaro.org>,
"cota@braap.org" <cota@braap.org>,
"jhauser@eecs.berkeley.edu" <jhauser@eecs.berkeley.edu>,
Denis Lunev <den@virtuozzo.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Subject: Re: [Qemu-devel] [PATCH] Fix: fp-test uninitialized member floatX::exp
Date: Tue, 13 Aug 2019 12:03:29 +0000 [thread overview]
Message-ID: <573f907d-5016-60c1-c727-c5444a418e1b@virtuozzo.com> (raw)
In-Reply-To: <1564481593-776647-1-git-send-email-andrey.shinkevich@virtuozzo.com>
PINGING...
On 30/07/2019 13:13, Andrey Shinkevich wrote:
> Not all the paths in the functions, such as f16ToFloatX(), initialize
> the member 'exp' of the structure floatX.
>
> Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
> ---
> source/slowfloat.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/fp/berkeley-testfloat-3/source/slowfloat.c b/tests/fp/berkeley-testfloat-3/source/slowfloat.c
> index 4e84656..6e0f0a6 100644
> --- a/tests/fp/berkeley-testfloat-3/source/slowfloat.c
> +++ b/tests/fp/berkeley-testfloat-3/source/slowfloat.c
> @@ -623,6 +623,7 @@ static void f16ToFloatX( float16_t a, struct floatX *xPtr )
> xPtr->isInf = false;
> xPtr->isZero = false;
> xPtr->sign = ((uiA & 0x8000) != 0);
> + xPtr->exp = 0;
> exp = uiA>>10 & 0x1F;
> sig64 = uiA & 0x03FF;
> sig64 <<= 45;
> @@ -759,6 +760,7 @@ static void f32ToFloatX( float32_t a, struct floatX *xPtr )
> xPtr->isInf = false;
> xPtr->isZero = false;
> xPtr->sign = ((uiA & 0x80000000) != 0);
> + xPtr->exp = 0;
> exp = uiA>>23 & 0xFF;
> sig64 = uiA & 0x007FFFFF;
> sig64 <<= 32;
> @@ -895,6 +897,7 @@ static void f64ToFloatX( float64_t a, struct floatX *xPtr )
> xPtr->isInf = false;
> xPtr->isZero = false;
> xPtr->sign = ((uiA & UINT64_C( 0x8000000000000000 )) != 0);
> + xPtr->exp = 0;
> exp = uiA>>52 & 0x7FF;
> sig64 = uiA & UINT64_C( 0x000FFFFFFFFFFFFF );
> if ( exp == 0x7FF ) {
> @@ -1220,6 +1223,7 @@ static void f128MToFloatX( const float128_t *aPtr, struct floatX *xPtr )
> xPtr->isZero = false;
> uiA64 = uiAPtr->v64;
> xPtr->sign = ((uiA64 & UINT64_C( 0x8000000000000000 )) != 0);
> + xPtr->exp = 0;
> exp = uiA64>>48 & 0x7FFF;
> sig.v64 = uiA64 & UINT64_C( 0x0000FFFFFFFFFFFF );
> sig.v0 = uiAPtr->v0;
>
--
With the best regards,
Andrey Shinkevich
next prev parent reply other threads:[~2019-08-13 12:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 10:13 [Qemu-devel] [PATCH] Fix: fp-test uninitialized member floatX::exp Andrey Shinkevich
2019-08-13 12:03 ` Andrey Shinkevich [this message]
2019-08-13 12:21 ` Alex Bennée
2019-08-20 17:01 ` Andrey Shinkevich
2019-08-27 15:05 ` Andrey Shinkevich
2019-08-27 15:59 ` Alex Bennée
2019-08-29 15:50 ` Andrey Shinkevich
2019-08-20 15:16 ` Andrey Shinkevich
2019-08-20 15:21 ` 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=573f907d-5016-60c1-c727-c5444a418e1b@virtuozzo.com \
--to=andrey.shinkevich@virtuozzo.com \
--cc=alex.bennee@linaro.org \
--cc=cota@braap.org \
--cc=den@virtuozzo.com \
--cc=jhauser@eecs.berkeley.edu \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.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).