]> Git Repo - qemu.git/commitdiff
target/mips: rationalise softfloat includes
authorAlex Bennée <[email protected]>
Thu, 8 Aug 2019 16:27:31 +0000 (17:27 +0100)
committerAlex Bennée <[email protected]>
Mon, 19 Aug 2019 11:07:13 +0000 (12:07 +0100)
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 <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Aleksandar Markovic <[email protected]>
linux-user/mips/cpu_loop.c
target/mips/cpu.h
target/mips/internal.h
target/mips/msa_helper.c
target/mips/op_helper.c

index 0ba894fa7aa5bbcbdcb2dd26b2c91ab7c3b13e47..39915b3fde2800d88a6706b124336f28728b34df 100644 (file)
@@ -22,6 +22,7 @@
 #include "qemu.h"
 #include "cpu_loop-common.h"
 #include "elf.h"
+#include "internal.h"
 
 # ifdef TARGET_ABI_MIPSO32
 #  define MIPS_SYS(name, args) args,
index 21c0615e02015822c8bb0d554dd8687f123193ad..d235117dab308fe8ea70846924878ef47bb41760 100644 (file)
@@ -5,7 +5,7 @@
 
 #include "cpu-qom.h"
 #include "exec/cpu-defs.h"
-#include "fpu/softfloat.h"
+#include "fpu/softfloat-types.h"
 #include "mips-defs.h"
 
 #define TCG_GUEST_DEFAULT_MO (0)
@@ -1195,12 +1195,6 @@ void itc_reconfigure(struct MIPSITUState *tag);
 /* helper.c */
 target_ulong exception_resume_pc(CPUMIPSState *env);
 
-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 cpu_get_tb_cpu_state(CPUMIPSState *env, target_ulong *pc,
                                         target_ulong *cs_base, uint32_t *flags)
 {
index d5aa5490d3c39fd598cf1262987cb32504232ea9..ae29b578a479412683265dcb0c1703f807d7587e 100644 (file)
@@ -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);
index a5a86572b4ad453af0bdbcbc1947f5fb5c19e19c..f24061e2af747bbfd752b38a52a6b9fb936c1b7b 100644 (file)
@@ -22,6 +22,7 @@
 #include "internal.h"
 #include "exec/exec-all.h"
 #include "exec/helper-proto.h"
+#include "fpu/softfloat.h"
 
 /* Data format min and max values */
 #define DF_BITS(df) (1 << ((df) + 3))
index 9e2e02f8586926818d9c081e7b265d524a94f579..f88a3ab9043f1e6b2115d99fa41847b92aea2bb1 100644 (file)
@@ -25,6 +25,7 @@
 #include "exec/exec-all.h"
 #include "exec/cpu_ldst.h"
 #include "sysemu/kvm.h"
+#include "fpu/softfloat.h"
 
 /*****************************************************************************/
 /* Exceptions processing helpers */
This page took 0.04304 seconds and 4 git commands to generate.