[PATCH 07/10] alpha: replace code inside ifdef with generic function

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

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

diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 1c8587d..c7bb207 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -2108,3 +2108,8 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model)
return env;
}

+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 d2408f6..bcad1f4 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -206,7 +206,7 @@ int cpu_restore_state(TranslationBlock *tb,
#elif defined(TARGET_MIPS)
gen_pc_load(env, tb, searched_pc, j, puc);
#elif defined(TARGET_ALPHA)
- env->pc = gen_opc_pc[j];
+ gen_pc_load(env, tb, searched_pc, j, puc);
#elif defined(TARGET_SH4)
env->pc = gen_opc_pc[j];
env->flags = gen_opc_hflags[j];