[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/7] softfloat: Implement floatx80_is_any_nan() and
From: |
Riku Voipio |
Subject: |
[Qemu-devel] [PATCH 4/7] softfloat: Implement floatx80_is_any_nan() and float128_is_any_nan() |
Date: |
Fri, 7 Jan 2011 22:52:32 +0200 |
From: Peter Maydell <address@hidden>
Implement versions of float*_is_any_nan() for the floatx80 and
float128 types.
Acked-by: Aurelien Jarno <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
fpu/softfloat.h | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/fpu/softfloat.h b/fpu/softfloat.h
index 15052cc..a6d0f16 100644
--- a/fpu/softfloat.h
+++ b/fpu/softfloat.h
@@ -489,6 +489,11 @@ INLINE int floatx80_is_zero(floatx80 a)
return (a.high & 0x7fff) == 0 && a.low == 0;
}
+INLINE int floatx80_is_any_nan(floatx80 a)
+{
+ return ((a.high & 0x7fff) == 0x7fff) && (a.low<<1);
+}
+
#endif
#ifdef FLOAT128
@@ -556,6 +561,12 @@ INLINE int float128_is_zero(float128 a)
return (a.high & 0x7fffffffffffffffLL) == 0 && a.low == 0;
}
+INLINE int float128_is_any_nan(float128 a)
+{
+ return ((a.high >> 48) & 0x7fff) == 0x7fff &&
+ ((a.low != 0) || ((a.high & 0xffffffffffffLL) != 0));
+}
+
#endif
#else /* CONFIG_SOFTFLOAT */
--
1.6.5
[Qemu-devel] [PATCH 1/7] linux-user: Implement sync_file_range{, 2} syscalls, Riku Voipio, 2011/01/07
[Qemu-devel] [PATCH 7/7] Remove dead code for ARM semihosting commandline handling, Riku Voipio, 2011/01/07
[Qemu-devel] [PATCH 6/7] Fix commandline handling for ARM semihosted executables, Riku Voipio, 2011/01/07