summaryrefslogtreecommitdiff
path: root/target-ppc/op_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-ppc/op_helper.c')
-rw-r--r--target-ppc/op_helper.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index 7136e51f7d..544d906664 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -492,6 +492,27 @@ static always_inline int isinfinity (float64 d)
(u.ll & 0x000FFFFFFFFFFFFFULL) == 0;
}
+#ifdef CONFIG_SOFTFLOAT
+static always_inline int isfinite (float64 d)
+{
+ CPU_DoubleU u;
+
+ u.d = d;
+
+ return (((u.ll >> 52) & 0x7FF) != 0x7FF);
+}
+
+static always_inline int isnormal (float64 d)
+{
+ CPU_DoubleU u;
+
+ u.d = d;
+
+ uint32_t exp = (u.ll >> 52) & 0x7FF;
+ return ((0 < exp) && (exp < 0x7FF));
+}
+#endif
+
void do_compute_fprf (int set_fprf)
{
int isneg;