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
|
@ -3067,15 +3067,12 @@ static unsigned int crisv32_decoder(CPUCRISState *env, DisasContext *dc)
|
|||
*/
|
||||
|
||||
/* generate intermediate code for basic block 'tb'. */
|
||||
static inline void
|
||||
gen_intermediate_code_internal(CRISCPU *cpu, TranslationBlock *tb,
|
||||
bool search_pc)
|
||||
void gen_intermediate_code(CPUCRISState *env, struct TranslationBlock *tb)
|
||||
{
|
||||
CRISCPU *cpu = cris_env_get_cpu(env);
|
||||
CPUState *cs = CPU(cpu);
|
||||
CPUCRISState *env = &cpu->env;
|
||||
uint32_t pc_start;
|
||||
unsigned int insn_len;
|
||||
int j, lj;
|
||||
struct DisasContext ctx;
|
||||
struct DisasContext *dc = &ctx;
|
||||
uint32_t next_page_start;
|
||||
|
@ -3127,13 +3124,13 @@ gen_intermediate_code_internal(CRISCPU *cpu, TranslationBlock *tb,
|
|||
|
||||
if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
|
||||
qemu_log(
|
||||
"srch=%d pc=%x %x flg=%" PRIx64 " bt=%x ds=%u ccs=%x\n"
|
||||
"pc=%x %x flg=%" PRIx64 " bt=%x ds=%u ccs=%x\n"
|
||||
"pid=%x usp=%x\n"
|
||||
"%x.%x.%x.%x\n"
|
||||
"%x.%x.%x.%x\n"
|
||||
"%x.%x.%x.%x\n"
|
||||
"%x.%x.%x.%x\n",
|
||||
search_pc, dc->pc, dc->ppc,
|
||||
dc->pc, dc->ppc,
|
||||
(uint64_t)tb->flags,
|
||||
env->btarget, (unsigned)tb->flags & 7,
|
||||
env->pregs[PR_CCS],
|
||||
|
@ -3149,7 +3146,6 @@ gen_intermediate_code_internal(CRISCPU *cpu, TranslationBlock *tb,
|
|||
}
|
||||
|
||||
next_page_start = (pc_start & TARGET_PAGE_MASK) + TARGET_PAGE_SIZE;
|
||||
lj = -1;
|
||||
num_insns = 0;
|
||||
max_insns = tb->cflags & CF_COUNT_MASK;
|
||||
if (max_insns == 0) {
|
||||
|
@ -3161,22 +3157,6 @@ gen_intermediate_code_internal(CRISCPU *cpu, TranslationBlock *tb,
|
|||
|
||||
gen_tb_start(tb);
|
||||
do {
|
||||
if (search_pc) {
|
||||
j = tcg_op_buf_count();
|
||||
if (lj < j) {
|
||||
lj++;
|
||||
while (lj < j) {
|
||||
tcg_ctx.gen_opc_instr_start[lj++] = 0;
|
||||
}
|
||||
}
|
||||
if (dc->delayed_branch == 1) {
|
||||
tcg_ctx.gen_opc_pc[lj] = dc->ppc | 1;
|
||||
} else {
|
||||
tcg_ctx.gen_opc_pc[lj] = dc->pc;
|
||||
}
|
||||
tcg_ctx.gen_opc_instr_start[lj] = 1;
|
||||
tcg_ctx.gen_opc_icount[lj] = num_insns;
|
||||
}
|
||||
tcg_gen_insn_start(dc->delayed_branch == 1
|
||||
? dc->ppc | 1 : dc->pc);
|
||||
num_insns++;
|
||||
|
@ -3308,16 +3288,8 @@ gen_intermediate_code_internal(CRISCPU *cpu, TranslationBlock *tb,
|
|||
}
|
||||
gen_tb_end(tb, num_insns);
|
||||
|
||||
if (search_pc) {
|
||||
j = tcg_op_buf_count();
|
||||
lj++;
|
||||
while (lj <= j) {
|
||||
tcg_ctx.gen_opc_instr_start[lj++] = 0;
|
||||
}
|
||||
} else {
|
||||
tb->size = dc->pc - pc_start;
|
||||
tb->icount = num_insns;
|
||||
}
|
||||
tb->size = dc->pc - pc_start;
|
||||
tb->icount = num_insns;
|
||||
|
||||
#ifdef DEBUG_DISAS
|
||||
#if !DISAS_CRIS
|
||||
|
@ -3331,16 +3303,6 @@ gen_intermediate_code_internal(CRISCPU *cpu, TranslationBlock *tb,
|
|||
#endif
|
||||
}
|
||||
|
||||
void gen_intermediate_code (CPUCRISState *env, struct TranslationBlock *tb)
|
||||
{
|
||||
gen_intermediate_code_internal(cris_env_get_cpu(env), tb, false);
|
||||
}
|
||||
|
||||
void gen_intermediate_code_pc (CPUCRISState *env, struct TranslationBlock *tb)
|
||||
{
|
||||
gen_intermediate_code_internal(cris_env_get_cpu(env), tb, true);
|
||||
}
|
||||
|
||||
void cris_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf,
|
||||
int flags)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue