@samitouri / QOSamiQemu / commits / 7811dd39a6

target/arm: extract helper-mve.h from helper.h

A few points to mention: - We mix helper prototypes and gen_helper definitions in a single header for convenience and to avoid headers boilerplate. - We rename existing tcg/helper-mve.h to helper-mve-defs.h to avoid conflict when including helper-mve.h. - We move mve helper_info definitions to tcg/mve_helper.c We'll repeat the same for other helpers. This allow to get rid of TARGET_AARCH64 in target/arm/helper.h. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-id: 20260219040150.2098396-4-pierrick.bouvier@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Pierrick Bouvier committed Feb 18, 2026 at 20:01 UTC 7811dd39a6c131ad79bd0d15b5bc8ecd1dad9d0e
6 files changed +20 -2
target/arm/helper-mve.h new
+14
@@ -0,0 +1,14 @@
1 +/* SPDX-License-Identifier: GPL-2.0-or-later */
2 +
3 +#ifndef HELPER_MVE_H
4 +#define HELPER_MVE_H
5 +
6 +#include "exec/helper-proto-common.h"
7 +#include "exec/helper-gen-common.h"
8 +
9 +#define HELPER_H "tcg/helper-mve-defs.h"
10 +#include "exec/helper-proto.h.inc"
11 +#include "exec/helper-gen.h.inc"
12 +#undef HELPER_H
13 +
14 +#endif /* HELPER_MVE_H */
target/arm/helper.h
-2
@@ -7,5 +7,3 @@
7 #include "tcg/helper-sve.h"
8 #include "tcg/helper-sme.h"
9 #endif
10 -
11 -#include "tcg/helper-mve.h"
target/arm/tcg/helper-mve-defs.h renamed
target/arm/tcg/mve_helper.c
+4
@@ -19,6 +19,7 @@
19
20 #include "qemu/osdep.h"
21 #include "cpu.h"
22 +#include "helper-mve.h"
23 #include "internals.h"
24 #include "vec_internal.h"
25 #include "exec/helper-proto.h"
@@ -27,6 +28,9 @@
28 #include "fpu/softfloat.h"
29 #include "crypto/clmul.h"
30
31 +#define HELPER_H "tcg/helper-mve-defs.h"
32 +#include "exec/helper-info.c.inc"
33 +
34 static uint16_t mve_eci_mask(CPUARMState *env)
35 {
36 /*
target/arm/tcg/translate-mve.c
+1
@@ -18,6 +18,7 @@
18 */
19
20 #include "qemu/osdep.h"
21 +#include "helper-mve.h"
22 #include "translate.h"
23 #include "translate-a32.h"
24
target/arm/tcg/translate.c
+1
@@ -28,6 +28,7 @@
28 #include "cpregs.h"
29 #include "exec/helper-proto.h"
30 #include "exec/target_page.h"
31 +#include "helper-mve.h"
32
33 #define HELPER_H "helper.h"
34 #include "exec/helper-info.c.inc"