From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>, Max Filippov <jcmvbkbc@gmail.com>
Subject: [Qemu-devel] [PATCH 3/9] target-xtensa: specialize softfloat NaN rules
Date: Sun, 9 Sep 2012 05:29:52 +0400 [thread overview]
Message-ID: <1347154198-8629-4-git-send-email-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <1347154198-8629-1-git-send-email-jcmvbkbc@gmail.com>
NaN propagation rule: leftmost NaN in the expression gets propagated to
the result.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
fpu/softfloat-specialize.h | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h
index 4902450..9d78f41 100644
--- a/fpu/softfloat-specialize.h
+++ b/fpu/softfloat-specialize.h
@@ -57,7 +57,8 @@ const float16 float16_default_nan = const_float16(0xFE00);
*----------------------------------------------------------------------------*/
#if defined(TARGET_SPARC)
const float32 float32_default_nan = const_float32(0x7FFFFFFF);
-#elif defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_ALPHA)
+#elif defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_ALPHA) || \
+ defined(TARGET_XTENSA)
const float32 float32_default_nan = const_float32(0x7FC00000);
#elif SNAN_BIT_IS_ONE
const float32 float32_default_nan = const_float32(0x7FBFFFFF);
@@ -262,9 +263,13 @@ float32 float32_maybe_silence_nan( float32 a_ )
# error Rules for silencing a signaling NaN are target-specific
# endif
#else
+# if defined(TARGET_XTENSA)
+ return a_;
+# else
uint32_t a = float32_val(a_);
a |= (1 << 22);
return make_float32(a);
+# endif
#endif
}
return a_;
@@ -372,7 +377,7 @@ static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN,
return 1;
}
}
-#elif defined(TARGET_PPC)
+#elif defined(TARGET_PPC) || defined(TARGET_XTENSA)
static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN,
flag aIsLargerSignificand)
{
--
1.7.7.6
next prev parent reply other threads:[~2012-09-09 1:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-09 1:29 [Qemu-devel] [PATCH 0/9] target-xtensa: implement FP coprocessor option Max Filippov
2012-09-09 1:29 ` [Qemu-devel] [PATCH 1/9] softfloat: make float_muladd_negate_* flags independent Max Filippov
2012-09-09 9:24 ` Aurelien Jarno
2012-09-09 1:29 ` [Qemu-devel] [PATCH 2/9] target-xtensa: handle boolean option in overlays Max Filippov
2012-09-09 1:29 ` Max Filippov [this message]
2012-09-09 9:31 ` [Qemu-devel] [PATCH 3/9] target-xtensa: specialize softfloat NaN rules Peter Maydell
2012-09-09 12:13 ` Max Filippov
2012-09-09 15:14 ` Max Filippov
2012-09-09 15:44 ` Peter Maydell
2012-09-09 1:29 ` [Qemu-devel] [PATCH 4/9] target-xtensa: add FP registers Max Filippov
2012-09-09 1:29 ` [Qemu-devel] [PATCH 5/9] target-xtensa: implement LSCX and LSCI groups Max Filippov
2012-09-09 1:29 ` [Qemu-devel] [PATCH 6/9] target-xtensa: implement FP0 arithmetic Max Filippov
2012-09-09 10:05 ` Peter Maydell
2012-09-09 12:25 ` Max Filippov
2012-09-09 12:56 ` Peter Maydell
2012-09-09 1:29 ` [Qemu-devel] [PATCH 7/9] target-xtensa: implement FP0 conversions Max Filippov
2012-09-09 11:06 ` Peter Maydell
2012-09-09 12:41 ` Max Filippov
2012-09-09 1:29 ` [Qemu-devel] [PATCH 8/9] target-xtensa: implement FP1 group Max Filippov
2012-09-09 1:29 ` [Qemu-devel] [PATCH 9/9] target-xtensa: implement coprocessor context option Max Filippov
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=1347154198-8629-4-git-send-email-jcmvbkbc@gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=blauwirbel@gmail.com \
--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).