From a8a826a3c3b8c8a1c4def0e9e22b46e78e6163a0 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Tue, 4 Dec 2012 20:16:07 +0000 Subject: exec: refactor cpu_restore_state Refactor common code around calls to cpu_restore_state(). tb_find_pc() has now no external users, make it static. Signed-off-by: Blue Swirl --- target-xtensa/op_helper.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'target-xtensa') diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c index 0e0f21d1a2..84f0449f79 100644 --- a/target-xtensa/op_helper.c +++ b/target-xtensa/op_helper.c @@ -47,22 +47,12 @@ static void do_unaligned_access(CPUXtensaState *env, #define SHIFT 3 #include "softmmu_template.h" -static void do_restore_state(CPUXtensaState *env, uintptr_t pc) -{ - TranslationBlock *tb; - - tb = tb_find_pc(pc); - if (tb) { - cpu_restore_state(tb, env, pc); - } -} - static void do_unaligned_access(CPUXtensaState *env, target_ulong addr, int is_write, int is_user, uintptr_t retaddr) { if (xtensa_option_enabled(env->config, XTENSA_OPTION_UNALIGNED_EXCEPTION) && !xtensa_option_enabled(env->config, XTENSA_OPTION_HW_ALIGNMENT)) { - do_restore_state(env, retaddr); + cpu_restore_state(env, retaddr); HELPER(exception_cause_vaddr)(env, env->pc, LOAD_STORE_ALIGNMENT_CAUSE, addr); } @@ -86,7 +76,7 @@ void tlb_fill(CPUXtensaState *env, paddr & TARGET_PAGE_MASK, access, mmu_idx, page_size); } else { - do_restore_state(env, retaddr); + cpu_restore_state(env, retaddr); HELPER(exception_cause_vaddr)(env, env->pc, ret, vaddr); } } -- cgit v1.2.1