diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-03-11 16:39:23 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-03-11 16:39:23 +0000 |
commit | 09c56b842ee3a1e5efbf98540408cdcafe451ab0 (patch) | |
tree | 3bae53212f43f37da4b69d3e212cb11a3bf6168b /target-mips/op_helper.c | |
parent | ecd78a0ac7a7f5f37638a1847391206bb04c48e1 (diff) |
Avoid flushing of global TLB entries for differing ASIDs (Thiemo Seufer).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1778 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op_helper.c')
-rw-r--r-- | target-mips/op_helper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index b1a308e671..9066ce7d1b 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -625,13 +625,14 @@ void do_tlbp (void) void do_tlbr (void) { tlb_t *tlb; + uint8_t ASID; int size; + ASID = env->CP0_EntryHi & 0xFF; tlb = &env->tlb[env->CP0_index & (MIPS_TLB_NB - 1)]; /* If this will change the current ASID, flush qemu's TLB. */ - /* FIXME: Could avoid flushing things which match global entries... */ - if ((env->CP0_EntryHi & 0xFF) != tlb->ASID) + if (ASID != tlb->ASID && tlb->G != 1) tlb_flush (env, 1); env->CP0_EntryHi = tlb->VPN | tlb->ASID; |