@@ -206,7 +206,7 @@ static int cpu_unwind_data_from_tb(TranslationBlock *tb, uintptr_t host_pc,
void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb,
uintptr_t host_pc)
{
- uint64_t data[TARGET_INSN_START_WORDS];
+ uint64_t data[TARGET_INSN_START_WORDS_MAX];
int insns_left = cpu_unwind_data_from_tb(tb, host_pc, data);
if (insns_left < 0) {
@@ -31,6 +31,7 @@
#include "qemu/log.h"
#ifdef CONFIG_TCG
#include "tcg/insn-start-words.h"
+#include "tcg/tcg.h"
#endif
void cpu_sync_avx_hflag(CPUX86State *env)
@@ -524,7 +525,7 @@ void cpu_x86_inject_mce(Monitor *mon, X86CPU *cpu, int bank,
static inline target_ulong get_memio_eip(CPUX86State *env)
{
#ifdef CONFIG_TCG
- uint64_t data[TARGET_INSN_START_WORDS];
+ uint64_t data[TARGET_INSN_START_WORDS_MAX];
CPUState *cs = env_cpu(env);
if (!cpu_unwind_state_data(cs, cs->mem_io_pc, data)) {
@@ -28,6 +28,7 @@
#include "hw/boards.h"
#endif
#include "tcg/insn-start-words.h"
+#include "tcg/tcg.h"
#define TO_SPR(group, number) (((group) << 11) + (number))
@@ -218,7 +219,7 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env, target_ulong rd,
{
OpenRISCCPU *cpu = env_archcpu(env);
#ifndef CONFIG_USER_ONLY
- uint64_t data[TARGET_INSN_START_WORDS];
+ uint64_t data[TARGET_INSN_START_WORDS_MAX];
MachineState *ms = MACHINE(qdev_get_machine());
CPUState *cs = env_cpu(env);
int idx;
Prefer the target-agnostic TARGET_INSN_START_WORDS_MAX definition over the target-specific TARGET_INSN_START_WORDS. The former is guaranty to hold the latter. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- accel/tcg/translate-all.c | 2 +- target/i386/helper.c | 3 ++- target/openrisc/sys_helper.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-)