target/arm: move exec/helper-* plumbery to helper.h
Since we cleaned helper.h, we can continue further and remove all exec/helper-* inclusion. This way, all helpers use the same pattern, and helper include details are limited to those headers. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-id: 20260219040150.2098396-9-pierrick.bouvier@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Pierrick Bouvier committed
Feb 18, 2026 at 20:01 UTC
bfc57f037d956f75607e678fb046581585ec319c
21 files changed
+34
-38
target/arm/helper.h
+12
-1
@@ -1,3 +1,14 @@
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
3
-#include "tcg/helper.h"
3
+#ifndef HELPER__H
4
+#define HELPER__H
5
+
6
+#include "exec/helper-proto-common.h"
7
+#include "exec/helper-gen-common.h"
8
+
9
+#define HELPER_H "tcg/helper-defs.h"
10
+#include "exec/helper-proto.h.inc"
11
+#include "exec/helper-gen.h.inc"
12
+#undef HELPER_H
13
+
14
+#endif /* HELPER__H */
target/arm/tcg/arith_helper.c
+1
-3
@@ -8,11 +8,9 @@
8
#include "qemu/osdep.h"
9
#include "qemu/bswap.h"
10
#include "qemu/crc32c.h"
11
+#include "helper.h"
12
#include <zlib.h> /* for crc32 */
13
13
-#define HELPER_H "tcg/helper.h"
14
-#include "exec/helper-proto.h.inc"
15
-
14
/*
15
* Note that signed overflow is undefined in C. The following routines are
16
* careful to use unsigned types where modulo arithmetic is required.
target/arm/tcg/crypto_helper.c
+1
-3
@@ -15,11 +15,9 @@
15
#include "tcg/tcg-gvec-desc.h"
16
#include "crypto/aes-round.h"
17
#include "crypto/sm4.h"
18
+#include "helper.h"
19
#include "vec_internal.h"
20
20
-#define HELPER_H "tcg/helper.h"
21
-#include "exec/helper-proto.h.inc"
22
-
21
union CRYPTO_STATE {
22
uint8_t bytes[16];
23
uint32_t words[4];
target/arm/tcg/debug.c
+1
-3
@@ -8,15 +8,13 @@
8
#include "qemu/osdep.h"
9
#include "qemu/log.h"
10
#include "cpu.h"
11
+#include "helper.h"
12
#include "internals.h"
13
#include "cpu-features.h"
14
#include "cpregs.h"
15
#include "exec/watchpoint.h"
16
#include "system/tcg.h"
17
17
-#define HELPER_H "tcg/helper.h"
18
-#include "exec/helper-proto.h.inc"
19
-
18
/* Return the Exception Level targeted by debug exceptions. */
19
static int arm_debug_target_el(CPUARMState *env)
20
{
target/arm/tcg/helper-a64.c
+1
-1
@@ -21,7 +21,7 @@
21
#include "qemu/units.h"
22
#include "cpu.h"
23
#include "gdbstub/helpers.h"
24
-#include "exec/helper-proto.h"
24
+#include "helper.h"
25
#include "helper-a64.h"
26
#include "qemu/host-utils.h"
27
#include "qemu/log.h"
target/arm/tcg/helper-defs.h
renamed
target/arm/tcg/hflags.c
+1
-3
@@ -7,15 +7,13 @@
7
*/
8
#include "qemu/osdep.h"
9
#include "cpu.h"
10
+#include "helper.h"
11
#include "internals.h"
12
#include "cpu-features.h"
13
#include "exec/translation-block.h"
14
#include "accel/tcg/cpu-ops.h"
15
#include "cpregs.h"
16
16
-#define HELPER_H "tcg/helper.h"
17
-#include "exec/helper-proto.h.inc"
18
-
17
static inline bool fgt_svc(CPUARMState *env, int el)
18
{
19
/*
target/arm/tcg/m_helper.c
+1
-1
@@ -8,10 +8,10 @@
8
9
#include "qemu/osdep.h"
10
#include "cpu.h"
11
+#include "helper.h"
12
#include "internals.h"
13
#include "cpu-features.h"
14
#include "gdbstub/helpers.h"
14
-#include "exec/helper-proto.h"
15
#include "qemu/main-loop.h"
16
#include "qemu/bitops.h"
17
#include "qemu/log.h"
target/arm/tcg/mte_helper.c
+1
-1
@@ -20,6 +20,7 @@
20
#include "qemu/osdep.h"
21
#include "qemu/log.h"
22
#include "cpu.h"
23
+#include "helper.h"
24
#include "internals.h"
25
#include "exec/target_page.h"
26
#include "exec/page-protection.h"
@@ -32,7 +33,6 @@
33
#include "accel/tcg/cpu-ldst.h"
34
#include "accel/tcg/probe.h"
35
#include "helper-a64.h"
35
-#include "exec/helper-proto.h"
36
#include "exec/tlb-flags.h"
37
#include "accel/tcg/cpu-ops.h"
38
#include "qapi/error.h"
target/arm/tcg/mve_helper.c
+1
-1
@@ -19,10 +19,10 @@
19
20
#include "qemu/osdep.h"
21
#include "cpu.h"
22
+#include "helper.h"
23
#include "helper-mve.h"
24
#include "internals.h"
25
#include "vec_internal.h"
25
-#include "exec/helper-proto.h"
26
#include "accel/tcg/cpu-ldst.h"
27
#include "tcg/tcg.h"
28
#include "fpu/softfloat.h"
target/arm/tcg/neon_helper.c
+1
-3
@@ -9,13 +9,11 @@
9
10
#include "qemu/osdep.h"
11
#include "cpu.h"
12
+#include "helper.h"
13
#include "tcg/tcg-gvec-desc.h"
14
#include "fpu/softfloat.h"
15
#include "vec_internal.h"
16
16
-#define HELPER_H "tcg/helper.h"
17
-#include "exec/helper-proto.h.inc"
18
-
17
#define SIGNBIT (uint32_t)0x80000000
18
#define SIGNBIT64 ((uint64_t)1 << 63)
19
target/arm/tcg/op_helper.c
+1
-1
@@ -19,8 +19,8 @@
19
#include "qemu/osdep.h"
20
#include "qemu/main-loop.h"
21
#include "cpu.h"
22
-#include "exec/helper-proto.h"
22
#include "exec/target_page.h"
23
+#include "helper.h"
24
#include "internals.h"
25
#include "cpu-features.h"
26
#include "accel/tcg/cpu-ldst.h"
target/arm/tcg/pauth_helper.c
+1
-1
@@ -19,11 +19,11 @@
19
20
#include "qemu/osdep.h"
21
#include "cpu.h"
22
+#include "helper.h"
23
#include "internals.h"
24
#include "cpu-features.h"
25
#include "accel/tcg/cpu-ldst.h"
26
#include "helper-a64.h"
26
-#include "exec/helper-proto.h"
27
#include "tcg/tcg-gvec-desc.h"
28
#include "qemu/xxhash.h"
29
target/arm/tcg/psci.c
+1
-1
@@ -18,7 +18,7 @@
18
19
#include "qemu/osdep.h"
20
#include "cpu.h"
21
-#include "exec/helper-proto.h"
21
+#include "helper.h"
22
#include "kvm-consts.h"
23
#include "qemu/main-loop.h"
24
#include "system/runstate.h"
target/arm/tcg/sme_helper.c
+1
-1
@@ -21,7 +21,7 @@
21
#include "cpu.h"
22
#include "internals.h"
23
#include "tcg/tcg-gvec-desc.h"
24
-#include "exec/helper-proto.h"
24
+#include "helper.h"
25
#include "helper-sme.h"
26
#include "accel/tcg/cpu-ldst.h"
27
#include "accel/tcg/helper-retaddr.h"
target/arm/tcg/sve_helper.c
+1
-1
@@ -21,9 +21,9 @@
21
#include "cpu.h"
22
#include "internals.h"
23
#include "exec/page-protection.h"
24
-#include "exec/helper-proto.h"
24
#include "exec/target_page.h"
25
#include "exec/tlb-flags.h"
26
+#include "helper.h"
27
#include "helper-a64.h"
28
#include "helper-sve.h"
29
#include "tcg/tcg-gvec-desc.h"
target/arm/tcg/tlb_helper.c
+1
-3
@@ -7,12 +7,10 @@
7
*/
8
#include "qemu/osdep.h"
9
#include "cpu.h"
10
+#include "helper.h"
11
#include "internals.h"
12
#include "cpu-features.h"
13
13
-#define HELPER_H "tcg/helper.h"
14
-#include "exec/helper-proto.h.inc"
15
-
14
/*
15
* Returns true if the stage 1 translation regime is using LPAE format page
16
* tables. Used when raising alignment exceptions, whose FSR changes depending
target/arm/tcg/translate.c
+4
-5
@@ -26,14 +26,10 @@
26
#include "arm_ldst.h"
27
#include "semihosting/semihost.h"
28
#include "cpregs.h"
29
-#include "exec/helper-proto.h"
29
#include "exec/target_page.h"
30
+#include "helper.h"
31
#include "helper-mve.h"
32
33
-#define HELPER_H "helper.h"
34
-#include "exec/helper-info.c.inc"
35
-#undef HELPER_H
36
-
33
#define ENABLE_ARCH_4T arm_dc_feature(s, ARM_FEATURE_V4T)
34
#define ENABLE_ARCH_5 arm_dc_feature(s, ARM_FEATURE_V5)
35
/* currently all emulated v5 cores are also v5TE, so don't bother */
@@ -45,6 +41,9 @@
41
#define ENABLE_ARCH_7 arm_dc_feature(s, ARM_FEATURE_V7)
42
#define ENABLE_ARCH_8 arm_dc_feature(s, ARM_FEATURE_V8)
43
44
+#define HELPER_H "tcg/helper-defs.h"
45
+#include "exec/helper-info.c.inc"
46
+
47
/* These are TCG globals which alias CPUARMState fields */
48
static TCGv_i32 cpu_R[16];
49
TCGv_i32 cpu_CF, cpu_NF, cpu_VF, cpu_ZF;
target/arm/tcg/translate.h
+1
-1
@@ -6,7 +6,7 @@
6
#include "tcg/tcg-op-gvec.h"
7
#include "exec/translator.h"
8
#include "exec/translation-block.h"
9
-#include "exec/helper-gen.h"
9
+#include "helper.h"
10
#include "internals.h"
11
#include "cpu-features.h"
12
target/arm/tcg/vec_helper.c
+1
-1
@@ -19,7 +19,7 @@
19
20
#include "qemu/osdep.h"
21
#include "cpu.h"
22
-#include "exec/helper-proto.h"
22
+#include "helper.h"
23
#include "helper-a64.h"
24
#include "helper-sme.h"
25
#include "helper-sve.h"
target/arm/tcg/vfp_helper.c
+1
-3
@@ -19,14 +19,12 @@
19
20
#include "qemu/osdep.h"
21
#include "cpu.h"
22
+#include "helper.h"
23
#include "internals.h"
24
#include "cpu-features.h"
25
#include "fpu/softfloat.h"
26
#include "qemu/log.h"
27
27
-#define HELPER_H "tcg/helper.h"
28
-#include "exec/helper-proto.h.inc"
29
-
28
/*
29
* Set the float_status behaviour to match the Arm defaults:
30
* * tininess-before-rounding