Commit 09c56b842ee3a1e5efbf98540408cdcafe451ab0
1 parent
ecd78a0a
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
Showing
1 changed file
with
3 additions
and
2 deletions
target-mips/op_helper.c
... | ... | @@ -625,13 +625,14 @@ void do_tlbp (void) |
625 | 625 | void do_tlbr (void) |
626 | 626 | { |
627 | 627 | tlb_t *tlb; |
628 | + uint8_t ASID; | |
628 | 629 | int size; |
629 | 630 | |
631 | + ASID = env->CP0_EntryHi & 0xFF; | |
630 | 632 | tlb = &env->tlb[env->CP0_index & (MIPS_TLB_NB - 1)]; |
631 | 633 | |
632 | 634 | /* If this will change the current ASID, flush qemu's TLB. */ |
633 | - /* FIXME: Could avoid flushing things which match global entries... */ | |
634 | - if ((env->CP0_EntryHi & 0xFF) != tlb->ASID) | |
635 | + if (ASID != tlb->ASID && tlb->G != 1) | |
635 | 636 | tlb_flush (env, 1); |
636 | 637 | |
637 | 638 | env->CP0_EntryHi = tlb->VPN | tlb->ASID; | ... | ... |