accel/tcg: Include missing 'exec/translation-block.h' header
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 13 Nov 2024 21:46:13 +0000 (22:46 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 20 Dec 2024 16:44:57 +0000 (17:44 +0100)
TB compile flags, tb_page_addr_t type, tb_cflags() and few
other methods are defined in "exec/translation-block.h".

All these files don't include "exec/translation-block.h" but
include "exec/exec-all.h" which include it. Explicitly include
"exec/translation-block.h" to be able to remove it from
"exec/exec-all.h" later when it won't be necessary. Otherwise
we'd get errors such:

  accel/tcg/internal-target.h:59:20: error: a parameter list without types is only allowed in a function definition
     59 | void tb_lock_page0(tb_page_addr_t);
        |                    ^
  accel/tcg/tb-hash.h:64:23: error: unknown type name 'tb_page_addr_t'
     64 | uint32_t tb_hash_func(tb_page_addr_t phys_pc, vaddr pc,
        |                       ^
  accel/tcg/tcg-accel-ops.c:62:36: error: use of undeclared identifier 'CF_CLUSTER_SHIFT'
     62 |     cflags = cpu->cluster_index << CF_CLUSTER_SHIFT;
        |                                    ^
  accel/tcg/watchpoint.c:102:47: error: use of undeclared identifier 'CF_NOIRQ'
    102 |                     cpu->cflags_next_tb = 1 | CF_NOIRQ | curr_cflags(cpu);
        |                                               ^
  target/i386/helper.c:536:28: error: use of undeclared identifier 'CF_PCREL'
    536 |     if (tcg_cflags_has(cs, CF_PCREL)) {
        |                            ^
  target/rx/cpu.c:51:21: error: incomplete definition of type 'struct TranslationBlock'
     51 |     cpu->env.pc = tb->pc;
        |                   ~~^
  system/physmem.c:2977:9: error: call to undeclared function 'tb_invalidate_phys_range'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   2977 |         tb_invalidate_phys_range(addr, addr + length - 1);
        |         ^
  plugins/api.c:96:12: error: call to undeclared function 'tb_cflags'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     96 |     return tb_cflags(tcg_ctx->gen_tb) & CF_MEMI_ONLY;
        |            ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20241114011310.3615-5-philmd@linaro.org>

25 files changed:
accel/tcg/internal-target.h
accel/tcg/tb-hash.h
cpu-target.c
linux-user/elfload.c
plugins/api.c
system/physmem.c
target/alpha/cpu.c
target/alpha/translate.c
target/arm/helper.c
target/arm/tcg/translate.h
target/avr/translate.c
target/hppa/translate.c
target/i386/tcg/tcg-cpu.c
target/i386/tcg/translate.c
target/m68k/translate.c
target/microblaze/translate.c
target/openrisc/translate.c
target/ppc/translate.c
target/riscv/translate.c
target/rx/translate.c
target/s390x/tcg/translate.c
target/sh4/translate.c
target/sparc/translate.c
target/tricore/translate.c
target/xtensa/translate.c

index 3ed81e740d3dd511fd36778d1a192d0668282ded..a664be02cc79332a66d62f622a344fc8cc2bcdef 100644 (file)
@@ -10,6 +10,7 @@
 #define ACCEL_TCG_INTERNAL_TARGET_H
 
 #include "exec/exec-all.h"
+#include "exec/translation-block.h"
 #include "tb-internal.h"
 
 /*
index a0c61f25cda551b6cff6297cb1d91daefdbc21ff..a5382f460dc0c46e921b4089cc1137bc966048cd 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "exec/cpu-defs.h"
 #include "exec/exec-all.h"
+#include "exec/translation-block.h"
 #include "qemu/xxhash.h"
 #include "tb-jmp-cache.h"
 
index 7a2efa890c4b9ed915cbe008a90ca946a7797048..beec7737907e61947917b38e3d37221f9e0bccb0 100644 (file)
@@ -42,6 +42,7 @@
 #include "exec/cpu-common.h"
 #include "exec/exec-all.h"
 #include "exec/tb-flush.h"
+#include "exec/translation-block.h"
 #include "exec/log.h"
 #include "hw/core/accel-cpu.h"
 #include "trace/trace-root.h"
index effd3ab47ef573c0e12f7855a1ed7383f89d6991..a2c152e5ad11735b3d662cef84cf291d01a96994 100644 (file)
@@ -10,6 +10,7 @@
 #include "user/tswap-target.h"
 #include "user/page-protection.h"
 #include "exec/page-protection.h"
+#include "exec/translation-block.h"
 #include "user/guest-base.h"
 #include "user-internals.h"
 #include "signal-common.h"
index 24ea64e2de5c6ead97c6f6285aea93256eb67672..4110cfaa2379e30574f3f1d2b11cb08facc40536 100644 (file)
@@ -43,6 +43,7 @@
 #include "tcg/tcg.h"
 #include "exec/exec-all.h"
 #include "exec/gdbstub.h"
+#include "exec/translation-block.h"
 #include "exec/translator.h"
 #include "disas/disas.h"
 #include "plugin.h"
index 1459dd15eb5b647979bf0f54464cc926e108db86..c76503aea8271f5be7df8d3154e9d927c182329c 100644 (file)
@@ -34,6 +34,7 @@
 #include "exec/exec-all.h"
 #include "exec/page-protection.h"
 #include "exec/target_page.h"
+#include "exec/translation-block.h"
 #include "hw/qdev-core.h"
 #include "hw/qdev-properties.h"
 #include "hw/boards.h"
index 70f67e6fd4e5d4abe1ab121d616243c31cc77d83..9fa506bff9f87cce32800fa7af09492e6d44e65c 100644 (file)
@@ -24,6 +24,7 @@
 #include "qemu/qemu-print.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
+#include "exec/translation-block.h"
 #include "fpu/softfloat.h"
 
 
index 660788d5c3c011613774c68de1efc973510176a2..629ff3cde92318c12110aefc87ba77bec4229920 100644 (file)
@@ -26,6 +26,7 @@
 #include "exec/helper-proto.h"
 #include "exec/helper-gen.h"
 #include "exec/translator.h"
+#include "exec/translation-block.h"
 #include "exec/log.h"
 
 #define HELPER_H "helper.h"
index 449e69a6e3974ec63cc637489a88ca6cd66bcc67..5b595f951b45e5f9b873ca9b216cc9c9576cc5c0 100644 (file)
@@ -20,6 +20,7 @@
 #include "qemu/crc32c.h"
 #include "qemu/qemu-print.h"
 #include "exec/exec-all.h"
+#include "exec/translation-block.h"
 #include <zlib.h> /* for crc32 */
 #include "hw/irq.h"
 #include "system/cpu-timers.h"
index 9b9abf1992572e9c5432bb320324363d8aec1eab..2d37d7c9f212f1b0d7f5b5486cdc6265594f372e 100644 (file)
@@ -6,6 +6,7 @@
 #include "tcg/tcg-op-gvec.h"
 #include "exec/exec-all.h"
 #include "exec/translator.h"
+#include "exec/translation-block.h"
 #include "exec/helper-gen.h"
 #include "internals.h"
 #include "cpu-features.h"
index 2d5189211598228ca6911396220650aa63deac69..f13b997f8d92253541cfbfc97d76dd86774eb164 100644 (file)
@@ -23,6 +23,7 @@
 #include "tcg/tcg.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
+#include "exec/translation-block.h"
 #include "tcg/tcg-op.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-gen.h"
index 51c1762435acdf5c0c423db91b408e4bc3d42b9b..d13f80fe3e4b8e991ad2940ad64cf8ad64065322 100644 (file)
@@ -27,6 +27,7 @@
 #include "exec/helper-proto.h"
 #include "exec/helper-gen.h"
 #include "exec/translator.h"
+#include "exec/translation-block.h"
 #include "exec/log.h"
 
 #define HELPER_H "helper.h"
index cca19cd40e81e5f58c5e73a62675f7cc390ad630..231ecac37d13ba04b2f598258f409b10444efed9 100644 (file)
@@ -22,6 +22,7 @@
 #include "helper-tcg.h"
 #include "qemu/accel.h"
 #include "hw/core/accel-cpu.h"
+#include "exec/translation-block.h"
 
 #include "tcg-cpu.h"
 
index ea7995106fb37703cd1d5646ababa87f7fd62c47..57e838739342b11c3c70e76ef97fedc46efd5646 100644 (file)
@@ -21,6 +21,7 @@
 #include "qemu/host-utils.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
+#include "exec/translation-block.h"
 #include "tcg/tcg-op.h"
 #include "tcg/tcg-op-gvec.h"
 #include "exec/translator.h"
index ad3ce34501420752939f45b85d1ff9d0a0a13952..077151c62d935712044eb29ce7e4f029e12f1dc3 100644 (file)
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
+#include "exec/translation-block.h"
 #include "tcg/tcg-op.h"
 #include "qemu/log.h"
 #include "qemu/qemu-print.h"
index 4beaf69e76a372f34bce989ed03f84a5de660aac..d53995c26d1c11b7450fbc1b79636f5522a43fb5 100644 (file)
@@ -26,6 +26,7 @@
 #include "exec/helper-proto.h"
 #include "exec/helper-gen.h"
 #include "exec/translator.h"
+#include "exec/translation-block.h"
 #include "qemu/qemu-print.h"
 
 #include "exec/log.h"
index ca566847cb4ff27f6cb86db8c085135a220af545..028ba66631f7d07bc6cf5deb0157b06cc4967877 100644 (file)
@@ -26,6 +26,7 @@
 #include "qemu/bitops.h"
 #include "qemu/qemu-print.h"
 #include "exec/translator.h"
+#include "exec/translation-block.h"
 
 #include "exec/helper-proto.h"
 #include "exec/helper-gen.h"
index 47ca50a064bdd95fda7ce9a4a7696c7b265a9f64..8ab87f42d67a24bc9d3259f76c01a11df0a66468 100644 (file)
@@ -30,6 +30,7 @@
 #include "exec/helper-gen.h"
 
 #include "exec/translator.h"
+#include "exec/translation-block.h"
 #include "exec/log.h"
 #include "qemu/atomic128.h"
 #include "spr_common.h"
index bccaf8e89a650fdc08e866f2edc4f22910e6c328..5fedde363f768e03f8f2eded7d5a2529e2a0193c 100644 (file)
@@ -25,6 +25,7 @@
 #include "exec/helper-gen.h"
 
 #include "exec/translator.h"
+#include "exec/translation-block.h"
 #include "exec/log.h"
 #include "semihosting/semihost.h"
 
index 9aade2b6e5c0020986db8783d98213946de19fa2..4f43654bad0265df4eb7d00cdd9efecb390c8817 100644 (file)
@@ -25,6 +25,7 @@
 #include "exec/helper-proto.h"
 #include "exec/helper-gen.h"
 #include "exec/translator.h"
+#include "exec/translation-block.h"
 #include "exec/log.h"
 
 #define HELPER_H "helper.h"
index bcfff40b255a1385151e610680cdc7acebfa2bf1..e78815c4f7f5c4943731ed55fd67f21d342bf3ee 100644 (file)
@@ -40,6 +40,7 @@
 #include "exec/helper-gen.h"
 
 #include "exec/translator.h"
+#include "exec/translation-block.h"
 #include "exec/log.h"
 #include "qemu/atomic128.h"
 
index 53b092175dcb65c89f1a003804b2af6d6bbbbbae..f076da9bac8ff8a89c6c77cd689220b1b181c587 100644 (file)
@@ -23,6 +23,7 @@
 #include "tcg/tcg-op.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-gen.h"
+#include "exec/translation-block.h"
 #include "exec/translator.h"
 #include "exec/log.h"
 #include "qemu/qemu-print.h"
index ac06377231039581461c4b4bdc1ff9c1f7901a16..9be26c804ed38643bdc8b50cef40f2c6ac17c0ea 100644 (file)
@@ -27,6 +27,7 @@
 #include "tcg/tcg-op-gvec.h"
 #include "exec/helper-gen.h"
 #include "exec/translator.h"
+#include "exec/translation-block.h"
 #include "exec/log.h"
 #include "fpu/softfloat.h"
 #include "asi.h"
index 4a12d2ca191b2c5a02da1af15cd6c10a16308d06..2b67395c09e323666de1714e9fc3a629e65d2202 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "tricore-opcodes.h"
 #include "exec/translator.h"
+#include "exec/translation-block.h"
 #include "exec/log.h"
 
 #define HELPER_H "helper.h"
index f4da4a40f94d8dfd0b9251582f83b17e5bd728a6..3c62c99b4fe52a0d96694d0b8672875f1834bc8f 100644 (file)
@@ -37,6 +37,7 @@
 #include "qemu/qemu-print.h"
 #include "semihosting/semihost.h"
 #include "exec/translator.h"
+#include "exec/translation-block.h"
 
 #include "exec/helper-proto.h"
 #include "exec/helper-gen.h"