summaryrefslogtreecommitdiff
path: root/target/mips/internal.h
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2019-08-08 17:27:31 +0100
committerAlex Bennée <alex.bennee@linaro.org>2019-08-19 12:07:13 +0100
commit502700d0674919309a19bfd016ea0680c6b7747d (patch)
treebc6f83c0855bf6e0ab9abb50219fa63d4929fb0f /target/mips/internal.h
parent00f43279a3e5e7ea3a0fa853157863663e838e2e (diff)
downloadqemu-502700d0674919309a19bfd016ea0680c6b7747d.zip
target/mips: rationalise softfloat includes
We should avoid including the whole of softfloat headers in cpu.h and explicitly include it only where we will be calling softfloat functions. We can use the -types.h in cpu.h for the few bits that are global. We also move the restore_snan_bit_mode into internal.h and include -helpers.h there. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Diffstat (limited to 'target/mips/internal.h')
-rw-r--r--target/mips/internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/target/mips/internal.h b/target/mips/internal.h
index d5aa5490d3..ae29b578a4 100644
--- a/target/mips/internal.h
+++ b/target/mips/internal.h
@@ -7,6 +7,7 @@
#ifndef MIPS_INTERNAL_H
#define MIPS_INTERNAL_H
+#include "fpu/softfloat-helpers.h"
/* MMU types, the first four entries have the same layout as the
CP0C0_MT field. */
@@ -226,6 +227,12 @@ static inline void restore_flush_mode(CPUMIPSState *env)
&env->active_fpu.fp_status);
}
+static inline void restore_snan_bit_mode(CPUMIPSState *env)
+{
+ set_snan_bit_is_one((env->active_fpu.fcr31 & (1 << FCR31_NAN2008)) == 0,
+ &env->active_fpu.fp_status);
+}
+
static inline void restore_fp_status(CPUMIPSState *env)
{
restore_rounding_mode(env);