mirror of https://gitee.com/openkylin/qemu.git
target/m68k: Merge disas_m68k_insn into m68k_tr_translate_insn
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20180512050250.12774-10-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
4c7a0f6f34
commit
a56f36c1d2
|
@ -6049,16 +6049,6 @@ void register_m68k_insns (CPUM68KState *env)
|
||||||
#undef INSN
|
#undef INSN
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ??? Some of this implementation is not exception safe. We should always
|
|
||||||
write back the result to memory before setting the condition codes. */
|
|
||||||
static void disas_m68k_insn(CPUM68KState * env, DisasContext *s)
|
|
||||||
{
|
|
||||||
uint16_t insn = read_im16(env, s);
|
|
||||||
opcode_table[insn](env, s, insn);
|
|
||||||
do_writebacks(s);
|
|
||||||
do_release(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void m68k_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu)
|
static void m68k_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu)
|
||||||
{
|
{
|
||||||
DisasContext *dc = container_of(dcbase, DisasContext, base);
|
DisasContext *dc = container_of(dcbase, DisasContext, base);
|
||||||
|
@ -6101,8 +6091,13 @@ static bool m68k_tr_breakpoint_check(DisasContextBase *dcbase, CPUState *cpu,
|
||||||
static void m68k_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
|
static void m68k_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
|
||||||
{
|
{
|
||||||
DisasContext *dc = container_of(dcbase, DisasContext, base);
|
DisasContext *dc = container_of(dcbase, DisasContext, base);
|
||||||
|
CPUM68KState *env = cpu->env_ptr;
|
||||||
|
uint16_t insn = read_im16(env, dc);
|
||||||
|
|
||||||
|
opcode_table[insn](env, dc, insn);
|
||||||
|
do_writebacks(dc);
|
||||||
|
do_release(dc);
|
||||||
|
|
||||||
disas_m68k_insn(cpu->env_ptr, dc);
|
|
||||||
dc->base.pc_next = dc->pc;
|
dc->base.pc_next = dc->pc;
|
||||||
|
|
||||||
if (dc->base.is_jmp == DISAS_NEXT) {
|
if (dc->base.is_jmp == DISAS_NEXT) {
|
||||||
|
|
Loading…
Reference in New Issue