From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/4] softfloat: Add float32_is_zero_or_denormal() function
Date: Fri, 7 Jan 2011 09:26:24 +0000 [thread overview]
Message-ID: <1294392387-24300-2-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1294392387-24300-1-git-send-email-peter.maydell@linaro.org>
Add a utility function to softfloat to test whether a float32
is zero or denormal.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
fpu/softfloat.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/fpu/softfloat.h b/fpu/softfloat.h
index 15052cc..1acf7af 100644
--- a/fpu/softfloat.h
+++ b/fpu/softfloat.h
@@ -336,6 +336,11 @@ INLINE int float32_is_any_nan(float32 a)
return ((float32_val(a) & ~(1 << 31)) > 0x7f800000UL);
}
+INLINE int float32_is_zero_or_denormal(float32 a)
+{
+ return (float32_val(a) & 0x7f800000) == 0;
+}
+
#define float32_zero make_float32(0)
#define float32_one make_float32(0x3f800000)
#define float32_ln2 make_float32(0x3f317218)
--
1.6.3.3
next prev parent reply other threads:[~2011-01-07 9:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 9:26 [Qemu-devel] [PATCH 0/4] target-arm: Fix VRSQRTS Peter Maydell
2011-01-07 9:26 ` Peter Maydell [this message]
2011-01-10 19:13 ` [Qemu-devel] [PATCH 1/4] softfloat: Add float32_is_zero_or_denormal() function Aurelien Jarno
2011-01-07 9:26 ` [Qemu-devel] [PATCH 2/4] target-arm: Fix implementation of VRSQRTS Peter Maydell
2011-01-10 19:20 ` Aurelien Jarno
2011-01-07 9:26 ` [Qemu-devel] [PATCH 3/4] target-arm: Add support for 'Standard FPSCR Value' as used by Neon Peter Maydell
2011-01-10 19:20 ` Aurelien Jarno
2011-01-07 9:26 ` [Qemu-devel] [PATCH 4/4] target-arm: Use the standard FPSCR value for VRSQRTS Peter Maydell
2011-01-10 19:20 ` Aurelien Jarno
2011-01-14 19:41 ` [Qemu-devel] [PATCH 0/4] target-arm: Fix VRSQRTS Aurelien Jarno
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=1294392387-24300-2-git-send-email-peter.maydell@linaro.org \
--to=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).