[PATCH 10/10] remove arch-specific ifdefs from translate-all.c

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

As the current state of matters, all architectures call a function
with the same name and signature for updating the pc. Remove the ifdefs,
leading to a cleaner code
---
translate-all.c | 19 +------------------
1 files changed, 1 insertions(+), 18 deletions(-)

diff --git a/translate-all.c b/translate-all.c
index 3afb656..83056d5 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -193,25 +193,8 @@ int cpu_restore_state(TranslationBlock *tb,
/* now find start of instruction before */
while (gen_opc_instr_start[j] == 0)
j--;
-#if defined(TARGET_I386)
+
gen_pc_load(env, tb, searched_pc, j, puc);
-#elif defined(TARGET_ARM)
- gen_pc_load(env, tb, searched_pc, j, puc);
-#elif defined(TARGET_SPARC)
- gen_pc_load(env, tb, searched_pc, j, puc);
-#elif defined(TARGET_PPC)
- gen_pc_load(env, tb, searched_pc, j, puc);
-#elif defined(TARGET_M68K)
- gen_pc_load(env, tb, searched_pc, j, puc);
-#elif defined(TARGET_MIPS)
- gen_pc_load(env, tb, searched_pc, j, puc);
-#elif defined(TARGET_ALPHA)
- gen_pc_load(env, tb, searched_pc, j, puc);
-#elif defined(TARGET_SH4)
- gen_pc_load(env, tb, searched_pc, j, puc);
-#elif defined(TARGET_CRIS)
- gen_pc_load(env, tb, searched_pc, j, puc);
-#endif

#ifdef CONFIG_PROFILER
dyngen_restore_time += profile_getclock() - ti;