aboutsummaryrefslogtreecommitdiff
path: root/target/hppa/mem_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2017-12-15 14:37:26 -0600
committerRichard Henderson <richard.henderson@linaro.org>2018-01-31 05:30:50 -0800
commit43e056522f3e653d0d7e412b4e4d54eb7bcae8b1 (patch)
treebe33d01c791fca04dde93fdc25d0c30913319660 /target/hppa/mem_helper.c
parentc643603a85fc27e2a899ec99b44a61ab1f631e21 (diff)
target/hppa: Implement B,GATE insn
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hppa/mem_helper.c')
-rw-r--r--target/hppa/mem_helper.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c
index ecd964d779..bf7559ba9e 100644
--- a/target/hppa/mem_helper.c
+++ b/target/hppa/mem_helper.c
@@ -122,6 +122,7 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx,
break;
default: /* execute: promote to privilege level type & 3 */
prot = x_prot;
+ break;
}
/* ??? Check PSW_P and ent->access_prot. This can remove PAGE_WRITE. */
@@ -335,4 +336,11 @@ target_ureg HELPER(lpa)(CPUHPPAState *env, target_ulong addr)
}
return phys;
}
+
+/* Return the ar_type of the TLB at VADDR, or -1. */
+int hppa_artype_for_page(CPUHPPAState *env, target_ulong vaddr)
+{
+ hppa_tlb_entry *ent = hppa_find_tlb(env, vaddr);
+ return ent ? ent->ar_type : -1;
+}
#endif /* CONFIG_USER_ONLY */