Skip to contentSkip to conversation

target-sh4: fix TLB invalidation code

PATCH Applied Alexandre Courbot 2 participants 2 messages Jan 25, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-sh4: fix TLB invalidation code

In cpu_sh4_invalidate_tlb, the UTLB was invalidated twice and the ITLB left unchaged, probably because of some unfortunate copy/paste.

---
 target-sh4/helper.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
target-sh4/helper.c +2 -2
index c34d2f5..aec4d75 100644
@@ -562,8 +562,8 @@ void cpu_load_tlb(CPUSH4State * env)
         entry->v = 0;
     }
     /* ITLB */
-    for (i = 0; i < UTLB_SIZE; i++) {
-        tlb_t * entry = &s->utlb[i];
+    for (i = 0; i < ITLB_SIZE; i++) {
+        tlb_t * entry = &s->itlb[i];
         entry->v = 0;
     }
 
Signature · 1 line
1.7.3.5
#1 lore raw
Quoted 13 lines · Alexandre Courbot

In cpu_sh4_invalidate_tlb, the UTLB was invalidated twice and the ITLB left unchaged, probably because of some unfortunate copy/paste.

---
 target-sh4/helper.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
target-sh4/helper.c +0 -0
index c34d2f5..aec4d75 100644

target-sh4/helper.c void cpu_load_tlb(CPUSH4State * env) · line 569

Quoted 10 lines
target-sh4/helper.c +2 -2
@@ -562,8 +562,8 @@ void cpu_load_tlb(CPUSH4State * env)
         entry->v = 0;
     }
     /* ITLB */
-    for (i = 0; i < UTLB_SIZE; i++) {
-        tlb_t * entry = &s->utlb[i];
+    for (i = 0; i < ITLB_SIZE; i++) {
+        tlb_t * entry = &s->itlb[i];
         entry->v = 0;
     }
 

Thanks applied.

Signature · 2 lines
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net