@samitouri / QOSamiQemu / commits / fefb9baf11

target/arm: Don't require helper prototypes in helper.c

In arm_cpu_do_interrupt_aarch64() we call the TCG helper function helper_rebuild_hflags_a64(), which requires helper.c to include the TCG helper function prototypes even when this file is being compiled with TCG disabled. We don't actually need to do this -- because we have already written the new EL into pstate and updated env->aarch64, we can call aarch64_rebuild_hflags() to achieve the same effect. This is the function we use everywhere else in this file to update hflags. Switch to aarch64_rebuild_hflags() and drop the include of the TCG helper headers. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-id: 20260219040150.2098396-3-pierrick.bouvier@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Peter Maydell committed Feb 18, 2026 at 20:01 UTC fefb9baf11959cfa8120507c06dc3670fe59f048
1 file changed +1 -4
target/arm/helper.c
+1 -4
@@ -36,9 +36,6 @@
36 #include "target/arm/gtimer.h"
37 #include "qemu/plugin.h"
38
39 -#define HELPER_H "tcg/helper.h"
40 -#include "exec/helper-proto.h.inc"
41 -
39 static void switch_mode(CPUARMState *env, int mode);
40
41 int compare_u64(const void *a, const void *b)
@@ -9479,7 +9476,7 @@ static void arm_cpu_do_interrupt_aarch64(CPUState *cs)
9476 aarch64_restore_sp(env, new_el);
9477
9478 if (tcg_enabled()) {
9482 - helper_rebuild_hflags_a64(env, new_el);
9479 + arm_rebuild_hflags(env);
9480 }
9481
9482 env->pc = addr;