mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
translate-all: Change tb_gen_code() argument to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
90b40a696a
commit
648f034c6c
5 changed files with 10 additions and 9 deletions
|
@ -938,10 +938,11 @@ static void build_page_bitmap(PageDesc *p)
|
|||
}
|
||||
}
|
||||
|
||||
TranslationBlock *tb_gen_code(CPUArchState *env,
|
||||
TranslationBlock *tb_gen_code(CPUState *cpu,
|
||||
target_ulong pc, target_ulong cs_base,
|
||||
int flags, int cflags)
|
||||
{
|
||||
CPUArchState *env = cpu->env_ptr;
|
||||
TranslationBlock *tb;
|
||||
uint8_t *tc_ptr;
|
||||
tb_page_addr_t phys_pc, phys_page2;
|
||||
|
@ -1111,7 +1112,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
|
|||
modifying the memory. It will ensure that it cannot modify
|
||||
itself */
|
||||
cpu->current_tb = NULL;
|
||||
tb_gen_code(env, current_pc, current_cs_base, current_flags, 1);
|
||||
tb_gen_code(cpu, current_pc, current_cs_base, current_flags, 1);
|
||||
cpu_resume_from_signal(env, NULL);
|
||||
}
|
||||
#endif
|
||||
|
@ -1208,7 +1209,7 @@ static void tb_invalidate_phys_page(tb_page_addr_t addr,
|
|||
modifying the memory. It will ensure that it cannot modify
|
||||
itself */
|
||||
cpu->current_tb = NULL;
|
||||
tb_gen_code(env, current_pc, current_cs_base, current_flags, 1);
|
||||
tb_gen_code(cpu, current_pc, current_cs_base, current_flags, 1);
|
||||
if (locked) {
|
||||
mmap_unlock();
|
||||
}
|
||||
|
@ -1469,7 +1470,7 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr)
|
|||
tb_phys_invalidate(tb, -1);
|
||||
/* FIXME: In theory this could raise an exception. In practice
|
||||
we have already translated the block once so it's probably ok. */
|
||||
tb_gen_code(env, pc, cs_base, flags, cflags);
|
||||
tb_gen_code(cpu, pc, cs_base, flags, cflags);
|
||||
/* TODO: If env->pc != tb->pc (i.e. the faulting instruction was not
|
||||
the first in the TB) then we end up generating a whole new TB and
|
||||
repeating the fault, which is horribly inefficient.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue