target/arm/tcg/translate.h: remove TARGET_AARCH64
We need to stub a64_translate_init and gen_a64_update_pc. At this point, we don't need to do anything for aarch64_translator_ops since it's just an external symbol. We can now include target/arm/tcg/translate.h from common code, since all target specific bits have been removed, or can be specialized with specific defines. 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: 20260407222208.271838-5-pierrick.bouvier@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Pierrick Bouvier committed
Apr 23, 2026 at 10:24 UTC
f087d14c7c757fccad8449539551abe652c54068
3 files changed
+18
-10
target/arm/tcg/meson.build
+1
@@ -21,6 +21,7 @@ gen_a32 = [
21
22
arm_ss.add(gen_a32)
23
arm_ss.add(when: 'TARGET_AARCH64', if_true: gen_a64)
24
+arm_ss.add(when: 'TARGET_AARCH64', if_false: files('stubs32.c'))
25
26
arm_ss.add(files(
27
'cpu32.c',
target/arm/tcg/stubs32.c
new
+17
@@ -0,0 +1,17 @@
1
+/*
2
+ * SPDX-License-Identifier: GPL-2.0-or-later
3
+ */
4
+
5
+#include "qemu/osdep.h"
6
+#include "target/arm/tcg/translate.h"
7
+
8
+
9
+void gen_a64_update_pc(DisasContext *s, int64_t diff)
10
+{
11
+ g_assert_not_reached();
12
+}
13
+
14
+void a64_translate_init(void)
15
+{
16
+ /* Don't initialize for 32 bits. Call site will be fixed later. */
17
+}
target/arm/tcg/translate.h
-10
@@ -357,19 +357,9 @@ static inline int curr_insn_len(DisasContext *s)
357
/* CPU state was modified dynamically; no need to exit, but do not chain. */
358
#define DISAS_UPDATE_NOCHAIN DISAS_TARGET_10
359
360
-#ifdef TARGET_AARCH64
360
void a64_translate_init(void);
361
void gen_a64_update_pc(DisasContext *s, int64_t diff);
362
extern const TranslatorOps aarch64_translator_ops;
364
-#else
365
-static inline void a64_translate_init(void)
366
-{
367
-}
368
-
369
-static inline void gen_a64_update_pc(DisasContext *s, int64_t diff)
370
-{
371
-}
372
-#endif
363
364
void arm_test_cc(DisasCompare *cmp, int cc);
365
void arm_jump_cc(DisasCompare *cmp, TCGLabel *label);