[PATCH 05/10] m68k: replace code inside ifdef with generic function

Glauber Costa
2008-04-25T03:23:05Z

target-m68k/translate.c | 5 +++++
translate-all.c | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 39816f4..36e27a1 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -3280,3 +3280,8 @@ void cpu_dump_state(CPUState *env, FILE *f,
cpu_fprintf (f, "FPRESULT = %12g\n", *(double *)&env->fp_result);
}

+void gen_pc_load(CPUState *env, TranslationBlock *tb,
+ unsigned long searched_pc, int pc_pos, void *puc)
+{
+ env->pc = gen_opc_pc[pc_pos];
+}
diff --git a/translate-all.c b/translate-all.c
index 66f03e1..5e63978 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -202,7 +202,7 @@ int cpu_restore_state(TranslationBlock *tb,
#elif defined(TARGET_PPC)
gen_pc_load(env, tb, searched_pc, j, puc);
#elif defined(TARGET_M68K)
- env->pc = gen_opc_pc[j];
+ gen_pc_load(env, tb, searched_pc, j, puc);
#elif defined(TARGET_MIPS)
env->PC[env->current_tc] = gen_opc_pc[j];
env->hflags &= ~MIPS_HFLAG_BMASK;