summaryrefslogtreecommitdiff
path: root/target-sh4/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-sh4/helper.c')
-rw-r--r--target-sh4/helper.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/target-sh4/helper.c b/target-sh4/helper.c
index 088d36a5f7..e7c494fb9a 100644
--- a/target-sh4/helper.c
+++ b/target-sh4/helper.c
@@ -574,6 +574,24 @@ void cpu_load_tlb(CPUSH4State * env)
entry->tc = (uint8_t)cpu_ptea_tc(env->ptea);
}
+ void cpu_sh4_invalidate_tlb(CPUSH4State *s)
+{
+ int i;
+
+ /* UTLB */
+ for (i = 0; i < UTLB_SIZE; i++) {
+ tlb_t * entry = &s->utlb[i];
+ entry->v = 0;
+ }
+ /* ITLB */
+ for (i = 0; i < UTLB_SIZE; i++) {
+ tlb_t * entry = &s->utlb[i];
+ entry->v = 0;
+ }
+
+ tlb_flush(s, 1);
+}
+
void cpu_sh4_write_mmaped_utlb_addr(CPUSH4State *s, target_phys_addr_t addr,
uint32_t mem_value)
{