mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
tcg: Remove gen_intermediate_code_pc
It is no longer used, so tidy up everything reached by it. This includes the gen_opc_* arrays, the search_pc parameter and the inline gen_intermediate_code_internal functions. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
fca8a500d5
commit
4e5e121515
22 changed files with 90 additions and 736 deletions
|
@ -2997,15 +2997,12 @@ static void gen_ibreak_check(CPUXtensaState *env, DisasContext *dc)
|
|||
}
|
||||
}
|
||||
|
||||
static inline
|
||||
void gen_intermediate_code_internal(XtensaCPU *cpu,
|
||||
TranslationBlock *tb, bool search_pc)
|
||||
void gen_intermediate_code(CPUXtensaState *env, TranslationBlock *tb)
|
||||
{
|
||||
XtensaCPU *cpu = xtensa_env_get_cpu(env);
|
||||
CPUState *cs = CPU(cpu);
|
||||
CPUXtensaState *env = &cpu->env;
|
||||
DisasContext dc;
|
||||
int insn_count = 0;
|
||||
int j, lj = -1;
|
||||
int max_insns = tb->cflags & CF_COUNT_MASK;
|
||||
uint32_t pc_start = tb->pc;
|
||||
uint32_t next_page_start =
|
||||
|
@ -3049,18 +3046,6 @@ void gen_intermediate_code_internal(XtensaCPU *cpu,
|
|||
}
|
||||
|
||||
do {
|
||||
if (search_pc) {
|
||||
j = tcg_op_buf_count();
|
||||
if (lj < j) {
|
||||
lj++;
|
||||
while (lj < j) {
|
||||
tcg_ctx.gen_opc_instr_start[lj++] = 0;
|
||||
}
|
||||
}
|
||||
tcg_ctx.gen_opc_pc[lj] = dc.pc;
|
||||
tcg_ctx.gen_opc_instr_start[lj] = 1;
|
||||
tcg_ctx.gen_opc_icount[lj] = insn_count;
|
||||
}
|
||||
tcg_gen_insn_start(dc.pc);
|
||||
++insn_count;
|
||||
|
||||
|
@ -3131,24 +3116,8 @@ void gen_intermediate_code_internal(XtensaCPU *cpu,
|
|||
qemu_log("\n");
|
||||
}
|
||||
#endif
|
||||
if (search_pc) {
|
||||
j = tcg_op_buf_count();
|
||||
memset(tcg_ctx.gen_opc_instr_start + lj + 1, 0,
|
||||
(j - lj) * sizeof(tcg_ctx.gen_opc_instr_start[0]));
|
||||
} else {
|
||||
tb->size = dc.pc - pc_start;
|
||||
tb->icount = insn_count;
|
||||
}
|
||||
}
|
||||
|
||||
void gen_intermediate_code(CPUXtensaState *env, TranslationBlock *tb)
|
||||
{
|
||||
gen_intermediate_code_internal(xtensa_env_get_cpu(env), tb, false);
|
||||
}
|
||||
|
||||
void gen_intermediate_code_pc(CPUXtensaState *env, TranslationBlock *tb)
|
||||
{
|
||||
gen_intermediate_code_internal(xtensa_env_get_cpu(env), tb, true);
|
||||
tb->size = dc.pc - pc_start;
|
||||
tb->icount = insn_count;
|
||||
}
|
||||
|
||||
void xtensa_cpu_dump_state(CPUState *cs, FILE *f,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue