[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 27/34] target/arm/tcg: Reduce 'helper-a64.h.inc' inclusion
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 27/34] target/arm/tcg: Reduce 'helper-a64.h.inc' inclusion |
Date: |
Mon, 19 Jun 2023 17:55:03 +0200 |
Instead of including helper-a64.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 | 4 ----
target/arm/tcg/helper-a64.c | 4 ++++
target/arm/tcg/sve_helper.c | 5 ++++-
target/arm/tcg/translate-a64.c | 6 ++++++
target/arm/tcg/vec_helper.c | 5 ++++-
5 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/target/arm/helper.h b/target/arm/helper.h
index 159ed9664f..aae2a38407 100644
--- a/target/arm/helper.h
+++ b/target/arm/helper.h
@@ -110,7 +110,3 @@ DEF_HELPER_3(ror_cc, i32, env, i32, i32)
DEF_HELPER_FLAGS_3(crc32, TCG_CALL_NO_RWG_SE, i32, i32, i32, i32)
DEF_HELPER_FLAGS_3(crc32c, TCG_CALL_NO_RWG_SE, i32, i32, i32, i32)
-
-#ifdef TARGET_AARCH64
-#include "tcg/helper-a64.h.inc"
-#endif
diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c
index 6312238676..782b6b6e94 100644
--- a/target/arm/tcg/helper-a64.c
+++ b/target/arm/tcg/helper-a64.c
@@ -35,6 +35,10 @@
#include "fpu/softfloat.h"
#include <zlib.h> /* For crc32 */
+#define HELPER_H "tcg/helper-a64.h.inc"
+#include "exec/helper-proto.h.inc"
+#undef HELPER_H
+
/* C2.4.7 Multiply and divide */
/* special cases for 0 and LLONG_MIN are mandated by the standard */
uint64_t HELPER(udiv64)(uint64_t num, uint64_t den)
diff --git a/target/arm/tcg/sve_helper.c b/target/arm/tcg/sve_helper.c
index 79a42af591..64f744bf6a 100644
--- a/target/arm/tcg/sve_helper.c
+++ b/target/arm/tcg/sve_helper.c
@@ -21,7 +21,6 @@
#include "cpu.h"
#include "internals.h"
#include "exec/exec-all.h"
-#include "exec/helper-proto.h"
#include "tcg/tcg-gvec-desc.h"
#include "fpu/softfloat.h"
#include "tcg/tcg.h"
@@ -37,6 +36,10 @@
#include "exec/helper-proto.h.inc"
#undef HELPER_H
+#define HELPER_H "tcg/helper-a64.h.inc"
+#include "exec/helper-proto.h.inc"
+#undef HELPER_H
+
/* Return a value for NZCV as per the ARM PredTest pseudofunction.
*
* The return value has bit 31 set if N is set, bit 1 set if Z is clear,
diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c
index a3d4265f85..73697f0cc9 100644
--- a/target/arm/tcg/translate-a64.c
+++ b/target/arm/tcg/translate-a64.c
@@ -58,6 +58,12 @@
#include "exec/helper-info.c.inc"
#undef HELPER_H
+#define HELPER_H "tcg/helper-a64.h.inc"
+#include "exec/helper-proto.h.inc"
+#include "exec/helper-gen.h.inc"
+#include "exec/helper-info.c.inc"
+#undef HELPER_H
+
static TCGv_i64 cpu_X[32];
static TCGv_i64 cpu_pc;
diff --git a/target/arm/tcg/vec_helper.c b/target/arm/tcg/vec_helper.c
index 99f81df9e1..dcfb3cfc96 100644
--- a/target/arm/tcg/vec_helper.c
+++ b/target/arm/tcg/vec_helper.c
@@ -19,7 +19,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "exec/helper-proto.h"
#include "tcg/tcg-gvec-desc.h"
#include "fpu/softfloat.h"
#include "qemu/int128.h"
@@ -41,6 +40,10 @@
#include "exec/helper-proto.h.inc"
#undef HELPER_H
+#define HELPER_H "tcg/helper-a64.h.inc"
+#include "exec/helper-proto.h.inc"
+#undef HELPER_H
+
/*
* Data for expanding active predicate bits to bytes, for byte elements.
*
--
2.38.1
- Re: [PATCH v3 22/34] target/arm/tcg: Reduce 'helper-crypto.h.inc' inclusion, (continued)
[PATCH v3 23/34] target/arm/tcg: Reduce 'helper-mve.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/19
[PATCH v3 24/34] target/arm/tcg: Reduce 'helper-sme.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/19
[PATCH v3 25/34] target/arm/tcg: Extract PAuth definitions to 'helper-pauth.h.inc', Philippe Mathieu-Daudé, 2023/06/19
[PATCH v3 26/34] target/arm/tcg: Extract MemTag definitions to 'helper-mte.h.inc', Philippe Mathieu-Daudé, 2023/06/19
[PATCH v3 27/34] target/arm/tcg: Reduce 'helper-a64.h.inc' inclusion,
Philippe Mathieu-Daudé <=
[PATCH v3 29/34] target/arm/tcg: Extract M-profile definitions to 'helper-m.h.inc', Philippe Mathieu-Daudé, 2023/06/19
[PATCH v3 28/34] target/arm/tcg: Move v8m_stackcheck() from op_helper.c to m_helper.c, Philippe Mathieu-Daudé, 2023/06/19
[PATCH v3 32/34] target/arm/tcg: Inline 'exec/helper-proto.h', Philippe Mathieu-Daudé, 2023/06/19
[PATCH v3 31/34] target/arm/tcg: Inline 'exec/helper-gen.h', Philippe Mathieu-Daudé, 2023/06/19
[PATCH v3 30/34] target/arm/tcg: Reduce 'helper-m.h.inc' inclusion, Philippe Mathieu-Daudé, 2023/06/19
[PATCH v3 34/34] tests/tcg/aarch64: Rename bti-crt.inc.c -> bti-crt.c.inc, Philippe Mathieu-Daudé, 2023/06/19
[PATCH v3 33/34] target/arm/tcg: Rename 'helper.h' -> 'tcg/helper.h.inc', Philippe Mathieu-Daudé, 2023/06/19