diff mbox series

[v1,5/7] target/mips: rationalise softfloat includes

Message ID 20190808164117.23348-6-alex.bennee@linaro.org
State New
Headers show
Series softfloat header cleanups | expand

Commit Message

Alex Bennée Aug. 8, 2019, 4:41 p.m. UTC
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 and -helpers.h in cpu.h for the few
bits that are global.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 target/mips/cpu.h        | 3 ++-
 target/mips/msa_helper.c | 1 +
 target/mips/op_helper.c  | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.20.1

Comments

Richard Henderson Aug. 8, 2019, 5:55 p.m. UTC | #1
On 8/8/19 9:41 AM, Alex Bennée wrote:
> index 21c0615e020..f146924623c 100644

> --- a/target/mips/cpu.h

> +++ b/target/mips/cpu.h

> @@ -5,7 +5,8 @@

>  

>  #include "cpu-qom.h"

>  #include "exec/cpu-defs.h"

> -#include "fpu/softfloat.h"

> +#include "fpu/softfloat-types.h"

> +#include "fpu/softfloat-helpers.h"


Do you really need softfloat-helpers.h here?
It appears as if this is only needed by target/mips/internal.h


r~
Alex Bennée Aug. 9, 2019, 8:33 a.m. UTC | #2
Richard Henderson <richard.henderson@linaro.org> writes:

> On 8/8/19 9:41 AM, Alex Bennée wrote:

>> index 21c0615e020..f146924623c 100644

>> --- a/target/mips/cpu.h

>> +++ b/target/mips/cpu.h

>> @@ -5,7 +5,8 @@

>>

>>  #include "cpu-qom.h"

>>  #include "exec/cpu-defs.h"

>> -#include "fpu/softfloat.h"

>> +#include "fpu/softfloat-types.h"

>> +#include "fpu/softfloat-helpers.h"

>

> Do you really need softfloat-helpers.h here?

> It appears as if this is only needed by target/mips/internal.h


I've moved the helper to internal.h which somehow gets auto-magically
included for cpu_loop.c for linux-user.

>

>

> r~



--
Alex Bennée
diff mbox series

Patch

diff --git a/target/mips/cpu.h b/target/mips/cpu.h
index 21c0615e020..f146924623c 100644
--- a/target/mips/cpu.h
+++ b/target/mips/cpu.h
@@ -5,7 +5,8 @@ 
 
 #include "cpu-qom.h"
 #include "exec/cpu-defs.h"
-#include "fpu/softfloat.h"
+#include "fpu/softfloat-types.h"
+#include "fpu/softfloat-helpers.h"
 #include "mips-defs.h"
 
 #define TCG_GUEST_DEFAULT_MO (0)
diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c
index a5a86572b4a..f24061e2af7 100644
--- a/target/mips/msa_helper.c
+++ b/target/mips/msa_helper.c
@@ -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))
diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c
index 9e2e02f8586..f88a3ab9043 100644
--- a/target/mips/op_helper.c
+++ b/target/mips/op_helper.c
@@ -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 */