From: Thomas Schwinge <thomas@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Thomas Schwinge <thomas@codesourcery.com>
Subject: [Qemu-trivial] [PATCH] fpu: Simplify floatx80ToCommonNaN function.
Date: Fri, 31 May 2013 11:39:14 +0200 [thread overview]
Message-ID: <1369993154-17690-1-git-send-email-thomas@codesourcery.com> (raw)
Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
---
fpu/softfloat-specialize.h | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git fpu/softfloat-specialize.h fpu/softfloat-specialize.h
index 518f694..83add1a 100644
--- fpu/softfloat-specialize.h
+++ fpu/softfloat-specialize.h
@@ -934,15 +934,14 @@ static commonNaNT floatx80ToCommonNaN( floatx80 a STATUS_PARAM)
commonNaNT z;
if ( floatx80_is_signaling_nan( a ) ) float_raise( float_flag_invalid STATUS_VAR);
- if ( a.low >> 63 ) {
- z.sign = a.high >> 15;
- z.low = 0;
- z.high = a.low << 1;
- } else {
- z.sign = floatx80_default_nan_high >> 15;
- z.low = 0;
- z.high = floatx80_default_nan_low << 1;
+ /* Replace a Pseudo NaN with a default NaN. */
+ if (!(a.low >> 63)) {
+ a.low = floatx80_default_nan_low;
+ a.high = floatx80_default_nan_high;
}
+ z.sign = a.high >> 15;
+ z.low = 0;
+ z.high = a.low << 1;
return z;
}
--
1.7.10.4
next reply other threads:[~2013-05-31 9:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 9:39 Thomas Schwinge [this message]
2013-05-31 12:07 ` [Qemu-trivial] [PATCH] fpu: Simplify floatx80ToCommonNaN function Michael Tokarev
2013-05-31 12:24 ` Paolo Bonzini
2013-05-31 12:34 ` [Qemu-trivial] [Qemu-devel] " Peter Maydell
2013-05-31 13:01 ` Thomas Schwinge
2013-05-31 14:45 ` Peter Maydell
2013-06-03 11:05 ` Thomas Schwinge
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=1369993154-17690-1-git-send-email-thomas@codesourcery.com \
--to=thomas@codesourcery.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).