summaryrefslogtreecommitdiff
path: root/target-cris
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>2010-10-07 21:20:52 +0200
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2010-10-07 21:20:52 +0200
commit3e18c6bf7740e4a75503b803ec7d5dc29a531e4f (patch)
treea5ccecdcdd08d56e3622edf8dc6839689e8018fa /target-cris
parent4447d609688e75a40a10b559e3b6ae83843e3095 (diff)
downloadqemu-3e18c6bf7740e4a75503b803ec7d5dc29a531e4f.tar.gz
qemu-3e18c6bf7740e4a75503b803ec7d5dc29a531e4f.tar.bz2
qemu-3e18c6bf7740e4a75503b803ec7d5dc29a531e4f.zip
cris: Consider the TLB valid bit on writes to the TLB
When updating the guest TLB we only need to flush previous mappings from the entry written if the entry was valid. Also fixes a compiler warning reported by Blue Swirl. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'target-cris')
-rw-r--r--target-cris/op_helper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/target-cris/op_helper.c b/target-cris/op_helper.c
index a60da94f30..be9eb06fd0 100644
--- a/target-cris/op_helper.c
+++ b/target-cris/op_helper.c
@@ -164,7 +164,9 @@ void helper_movl_sreg_reg (uint32_t sreg, uint32_t reg)
D_LOG("tlb flush vaddr=%x v=%d pc=%x\n",
vaddr, tlb_v, env->pc);
- tlb_flush_page(env, vaddr);
+ if (tlb_v) {
+ tlb_flush_page(env, vaddr);
+ }
}
}
#endif