diff options
Diffstat (limited to 'target-xtensa')
-rw-r--r-- | target-xtensa/helper.c | 3 | ||||
-rw-r--r-- | target-xtensa/op_helper.c | 14 |
2 files changed, 4 insertions, 13 deletions
diff --git a/target-xtensa/helper.c b/target-xtensa/helper.c index 200fb43c28..bf05575eb5 100644 --- a/target-xtensa/helper.c +++ b/target-xtensa/helper.c @@ -522,7 +522,8 @@ static int get_physical_addr_mmu(CPUXtensaState *env, bool update_tlb, INST_FETCH_PRIVILEGE_CAUSE; } - *access = mmu_attr_to_access(entry->attr); + *access = mmu_attr_to_access(entry->attr) & + ~(dtlb ? PAGE_EXEC : PAGE_READ | PAGE_WRITE); if (!is_access_granted(*access, is_write)) { return dtlb ? (is_write ? 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); } } |