OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d93d8e
)
softfloat: Add float16_is_normal
author
Stephen Long
<steplong@quicinc.com>
Tue, 16 Jun 2020 19:17:43 +0000
(12:17 -0700)
committer
Richard Henderson
<richard.henderson@linaro.org>
Fri, 28 Aug 2020 17:48:07 +0000
(10:48 -0700)
This float16 predicate was missing from the normal set.
Signed-off-by: Stephen Long <steplong@quicinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
include/fpu/softfloat.h
patch
|
blob
|
history
diff --git
a/include/fpu/softfloat.h
b/include/fpu/softfloat.h
index
0a5a5e5
..
863dfc6
100644
(file)
--- a/
include/fpu/softfloat.h
+++ b/
include/fpu/softfloat.h
@@
-272,6
+272,11
@@
static inline bool float16_is_zero_or_denormal(float16 a)
return (float16_val(a) & 0x7c00) == 0;
}
+static inline bool float16_is_normal(float16 a)
+{
+ return (((float16_val(a) >> 10) + 1) & 0x1f) >= 2;
+}
+
static inline float16 float16_abs(float16 a)
{
/* Note that abs does *not* handle NaN specially, nor does