On 3/4/25 23:29, Philippe Mathieu-Daudé wrote:
On 2/4/25 23:02, Philippe Mathieu-Daudé wrote:
To avoid including the huge "cpu.h" for a simple definition,
move TARGET_INSN_START_EXTRA_WORDS to "cpu-param.h".
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
target/arm/cpu-param.h | 7 +++++++
target/arm/cpu.h | 6 ------
target/hppa/cpu-param.h | 2 ++
target/hppa/cpu.h | 2 --
target/i386/cpu-param.h | 2 ++
target/i386/cpu.h | 2 --
target/m68k/cpu-param.h | 2 ++
target/m68k/cpu.h | 2 --
target/microblaze/cpu-param.h | 2 ++
target/microblaze/cpu.h | 2 --
target/mips/cpu-param.h | 2 ++
target/mips/cpu.h | 2 --
target/openrisc/cpu-param.h | 2 ++
target/openrisc/cpu.h | 2 --
target/riscv/cpu-param.h | 8 ++++++++
target/riscv/cpu.h | 6 ------
target/s390x/cpu-param.h | 2 ++
target/s390x/cpu.h | 2 --
target/sh4/cpu-param.h | 2 ++
target/sh4/cpu.h | 2 --
target/sparc/cpu-param.h | 2 ++
target/sparc/cpu.h | 1 -
22 files changed, 33 insertions(+), 29 deletions(-)
Missing:
-- >8 --
diff --git a/include/tcg/insn-start-words.h b/include/tcg/insn-start-
words.h
index 394c191da8d..d416d19bcf9 100644
--- a/include/tcg/insn-start-words.h
+++ b/include/tcg/insn-start-words.h
@@ -8,3 +8,3 @@
-#include "cpu.h"
+#include "cpu-param.h"
---
Thus we also need to add another commit before:
-- >8 --
Author: Philippe Mathieu-Daudé <[email protected]>
Date: Thu Apr 3 23:37:54 2025 +0200
tcg: Include missing 'cpu.h' in translate-all.c
tb_check_watchpoint() calls cpu_get_tb_cpu_state(),
which is declared in each "cpu.h" header. It is indirectly
included via "tcg/insn-start-words.h". Since we want to
rework "tcg/insn-start-words.h", removing "cpu.h" in the
next commit, add the missing header now, otherwise we'd
get:
accel/tcg/translate-all.c:598:9: error: call to undeclared
function 'cpu_get_tb_cpu_state' [-Wimplicit-function-declaration]
598 | cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);
| ^
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index ed41fc5d0cc..c5590eb6955 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -71,2 +71,3 @@
#include "tcg/insn-start-words.h"
+#include "cpu.h"
---