[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 22/26] target/arm/tcg: Reduce 'helper-m.h.inc' inclusion
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 22/26] target/arm/tcg: Reduce 'helper-m.h.inc' inclusion |
Date: |
Sun, 11 Jun 2023 10:58:42 +0200 |
Instead of including helper-m.h.inc via helper.h which is
included by all TCG files, restrict it to the few files
that require it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/arm/helper.h | 2 --
target/arm/tcg/m_helper.c | 4 ++++
target/arm/tcg/translate-m-nocp.c | 6 ++++++
target/arm/tcg/translate-vfp.c | 4 ++++
target/arm/tcg/translate.c | 5 +++++
5 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/target/arm/helper.h b/target/arm/helper.h
index 05117934f3..37f9879b95 100644
--- a/target/arm/helper.h
+++ b/target/arm/helper.h
@@ -521,5 +521,3 @@ DEF_HELPER_FLAGS_5(gvec_uclamp_s, TCG_CALL_NO_RWG,
void, ptr, ptr, ptr, ptr, i32)
DEF_HELPER_FLAGS_5(gvec_uclamp_d, TCG_CALL_NO_RWG,
void, ptr, ptr, ptr, ptr, i32)
-
-#include "tcg/helper-m.h.inc"
diff --git a/target/arm/tcg/m_helper.c b/target/arm/tcg/m_helper.c
index 0780bb3dea..45568d96bb 100644
--- a/target/arm/tcg/m_helper.c
+++ b/target/arm/tcg/m_helper.c
@@ -21,6 +21,10 @@
#include "hw/intc/armv7m_nvic.h"
#endif
+#define HELPER_H "tcg/helper-m.h.inc"
+#include "exec/helper-proto.h.inc"
+#undef HELPER_H
+
static void v7m_msr_xpsr(CPUARMState *env, uint32_t mask,
uint32_t reg, uint32_t val)
{
diff --git a/target/arm/tcg/translate-m-nocp.c
b/target/arm/tcg/translate-m-nocp.c
index 7343945b41..ee9c296a98 100644
--- a/target/arm/tcg/translate-m-nocp.c
+++ b/target/arm/tcg/translate-m-nocp.c
@@ -25,6 +25,12 @@
#include "exec/helper-gen.h.inc"
#undef HELPER_H
+#define HELPER_H "tcg/helper-m.h.inc"
+#include "exec/helper-proto.h.inc"
+#include "exec/helper-gen.h.inc"
+#include "exec/helper-info.c.inc"
+#undef HELPER_H
+
/* Include the generated decoder */
#include "decode-m-nocp.c.inc"
diff --git a/target/arm/tcg/translate-vfp.c b/target/arm/tcg/translate-vfp.c
index 10d4502239..7d36a06726 100644
--- a/target/arm/tcg/translate-vfp.c
+++ b/target/arm/tcg/translate-vfp.c
@@ -24,6 +24,10 @@
#include "translate.h"
#include "translate-a32.h"
+#define HELPER_H "tcg/helper-m.h.inc"
+#include "exec/helper-gen.h.inc"
+#undef HELPER_H
+
#define HELPER_H "tcg/helper-vfp.h.inc"
#include "exec/helper-proto.h.inc"
#include "exec/helper-gen.h.inc"
diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c
index d88b355230..0e692f45f8 100644
--- a/target/arm/tcg/translate.c
+++ b/target/arm/tcg/translate.c
@@ -37,6 +37,11 @@
#include "exec/helper-gen.h.inc"
#undef HELPER_H
+#define HELPER_H "tcg/helper-m.h.inc"
+#include "exec/helper-proto.h.inc"
+#include "exec/helper-gen.h.inc"
+#undef HELPER_H
+
#define HELPER_H "helper.h"
#include "exec/helper-info.c.inc"
#undef HELPER_H
--
2.38.1
- Re: [PATCH v2 20/26] target/arm/tcg: Move v8m_stackcheck() from op_helper.c to m_helper.c, (continued)
- [PATCH v2 19/26] target/arm/tcg: Reduce 'helper-a64.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 21/26] target/arm/tcg: Extract M-profile definitions to 'helper-m.h.inc', Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 22/26] target/arm/tcg: Reduce 'helper-m.h.inc' inclusion,
Philippe Mathieu-Daudé <=
- [PATCH v2 23/26] target/arm/tcg: Inline 'exec/helper-gen.h', Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 25/26] target/arm/tcg: Rename 'helper.h' -> 'tcg/helper.h.inc', Philippe Mathieu-Daudé, 2023/06/11
- [PATCH v2 26/26] tests/tcg/aarch64: Rename bti-crt.inc.c -> bti-crt.c.inc, Philippe Mathieu-Daudé, 2023/06/11