accel/tcg: Include missing 'exec/translation-block.h' header

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>
This commit is contained in:
Philippe Mathieu-Daudé 2024-11-13 22:46:13 +01:00
parent 8865049bab
commit 68df8c8dba
25 changed files with 25 additions and 0 deletions

View file

@ -10,6 +10,7 @@
#define ACCEL_TCG_INTERNAL_TARGET_H #define ACCEL_TCG_INTERNAL_TARGET_H
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "exec/translation-block.h"
#include "tb-internal.h" #include "tb-internal.h"
/* /*

View file

@ -22,6 +22,7 @@
#include "exec/cpu-defs.h" #include "exec/cpu-defs.h"
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "exec/translation-block.h"
#include "qemu/xxhash.h" #include "qemu/xxhash.h"
#include "tb-jmp-cache.h" #include "tb-jmp-cache.h"

View file

@ -42,6 +42,7 @@
#include "exec/cpu-common.h" #include "exec/cpu-common.h"
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "exec/tb-flush.h" #include "exec/tb-flush.h"
#include "exec/translation-block.h"
#include "exec/log.h" #include "exec/log.h"
#include "hw/core/accel-cpu.h" #include "hw/core/accel-cpu.h"
#include "trace/trace-root.h" #include "trace/trace-root.h"

View file

@ -10,6 +10,7 @@
#include "user/tswap-target.h" #include "user/tswap-target.h"
#include "user/page-protection.h" #include "user/page-protection.h"
#include "exec/page-protection.h" #include "exec/page-protection.h"
#include "exec/translation-block.h"
#include "user/guest-base.h" #include "user/guest-base.h"
#include "user-internals.h" #include "user-internals.h"
#include "signal-common.h" #include "signal-common.h"

View file

@ -43,6 +43,7 @@
#include "tcg/tcg.h" #include "tcg/tcg.h"
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "exec/gdbstub.h" #include "exec/gdbstub.h"
#include "exec/translation-block.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "disas/disas.h" #include "disas/disas.h"
#include "plugin.h" #include "plugin.h"

View file

@ -34,6 +34,7 @@
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "exec/page-protection.h" #include "exec/page-protection.h"
#include "exec/target_page.h" #include "exec/target_page.h"
#include "exec/translation-block.h"
#include "hw/qdev-core.h" #include "hw/qdev-core.h"
#include "hw/qdev-properties.h" #include "hw/qdev-properties.h"
#include "hw/boards.h" #include "hw/boards.h"

View file

@ -24,6 +24,7 @@
#include "qemu/qemu-print.h" #include "qemu/qemu-print.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "exec/translation-block.h"
#include "fpu/softfloat.h" #include "fpu/softfloat.h"

View file

@ -26,6 +26,7 @@
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/helper-gen.h" #include "exec/helper-gen.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/translation-block.h"
#include "exec/log.h" #include "exec/log.h"
#define HELPER_H "helper.h" #define HELPER_H "helper.h"

View file

@ -20,6 +20,7 @@
#include "qemu/crc32c.h" #include "qemu/crc32c.h"
#include "qemu/qemu-print.h" #include "qemu/qemu-print.h"
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "exec/translation-block.h"
#include <zlib.h> /* for crc32 */ #include <zlib.h> /* for crc32 */
#include "hw/irq.h" #include "hw/irq.h"
#include "system/cpu-timers.h" #include "system/cpu-timers.h"

View file

@ -6,6 +6,7 @@
#include "tcg/tcg-op-gvec.h" #include "tcg/tcg-op-gvec.h"
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/translation-block.h"
#include "exec/helper-gen.h" #include "exec/helper-gen.h"
#include "internals.h" #include "internals.h"
#include "cpu-features.h" #include "cpu-features.h"

View file

@ -23,6 +23,7 @@
#include "tcg/tcg.h" #include "tcg/tcg.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "exec/translation-block.h"
#include "tcg/tcg-op.h" #include "tcg/tcg-op.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/helper-gen.h" #include "exec/helper-gen.h"

View file

@ -27,6 +27,7 @@
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/helper-gen.h" #include "exec/helper-gen.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/translation-block.h"
#include "exec/log.h" #include "exec/log.h"
#define HELPER_H "helper.h" #define HELPER_H "helper.h"

View file

@ -22,6 +22,7 @@
#include "helper-tcg.h" #include "helper-tcg.h"
#include "qemu/accel.h" #include "qemu/accel.h"
#include "hw/core/accel-cpu.h" #include "hw/core/accel-cpu.h"
#include "exec/translation-block.h"
#include "tcg-cpu.h" #include "tcg-cpu.h"

View file

@ -21,6 +21,7 @@
#include "qemu/host-utils.h" #include "qemu/host-utils.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "exec/translation-block.h"
#include "tcg/tcg-op.h" #include "tcg/tcg-op.h"
#include "tcg/tcg-op-gvec.h" #include "tcg/tcg-op-gvec.h"
#include "exec/translator.h" #include "exec/translator.h"

View file

@ -21,6 +21,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h" #include "exec/exec-all.h"
#include "exec/translation-block.h"
#include "tcg/tcg-op.h" #include "tcg/tcg-op.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "qemu/qemu-print.h" #include "qemu/qemu-print.h"

View file

@ -26,6 +26,7 @@
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/helper-gen.h" #include "exec/helper-gen.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/translation-block.h"
#include "qemu/qemu-print.h" #include "qemu/qemu-print.h"
#include "exec/log.h" #include "exec/log.h"

View file

@ -26,6 +26,7 @@
#include "qemu/bitops.h" #include "qemu/bitops.h"
#include "qemu/qemu-print.h" #include "qemu/qemu-print.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/translation-block.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/helper-gen.h" #include "exec/helper-gen.h"

View file

@ -30,6 +30,7 @@
#include "exec/helper-gen.h" #include "exec/helper-gen.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/translation-block.h"
#include "exec/log.h" #include "exec/log.h"
#include "qemu/atomic128.h" #include "qemu/atomic128.h"
#include "spr_common.h" #include "spr_common.h"

View file

@ -25,6 +25,7 @@
#include "exec/helper-gen.h" #include "exec/helper-gen.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/translation-block.h"
#include "exec/log.h" #include "exec/log.h"
#include "semihosting/semihost.h" #include "semihosting/semihost.h"

View file

@ -25,6 +25,7 @@
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/helper-gen.h" #include "exec/helper-gen.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/translation-block.h"
#include "exec/log.h" #include "exec/log.h"
#define HELPER_H "helper.h" #define HELPER_H "helper.h"

View file

@ -40,6 +40,7 @@
#include "exec/helper-gen.h" #include "exec/helper-gen.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/translation-block.h"
#include "exec/log.h" #include "exec/log.h"
#include "qemu/atomic128.h" #include "qemu/atomic128.h"

View file

@ -23,6 +23,7 @@
#include "tcg/tcg-op.h" #include "tcg/tcg-op.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/helper-gen.h" #include "exec/helper-gen.h"
#include "exec/translation-block.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/log.h" #include "exec/log.h"
#include "qemu/qemu-print.h" #include "qemu/qemu-print.h"

View file

@ -27,6 +27,7 @@
#include "tcg/tcg-op-gvec.h" #include "tcg/tcg-op-gvec.h"
#include "exec/helper-gen.h" #include "exec/helper-gen.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/translation-block.h"
#include "exec/log.h" #include "exec/log.h"
#include "fpu/softfloat.h" #include "fpu/softfloat.h"
#include "asi.h" #include "asi.h"

View file

@ -30,6 +30,7 @@
#include "tricore-opcodes.h" #include "tricore-opcodes.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/translation-block.h"
#include "exec/log.h" #include "exec/log.h"
#define HELPER_H "helper.h" #define HELPER_H "helper.h"

View file

@ -37,6 +37,7 @@
#include "qemu/qemu-print.h" #include "qemu/qemu-print.h"
#include "semihosting/semihost.h" #include "semihosting/semihost.h"
#include "exec/translator.h" #include "exec/translator.h"
#include "exec/translation-block.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/helper-gen.h" #include "exec/helper-gen.h"