target-mips: fix EntryHi.EHINV being cleared on TLB exception
authorLeon Alrae <leon.alrae@imgtec.com>
Thu, 28 Jul 2016 08:28:23 +0000 (09:28 +0100)
committerLeon Alrae <leon.alrae@imgtec.com>
Thu, 28 Jul 2016 10:24:02 +0000 (11:24 +0100)
While implementing TLB invalidation feature we forgot to modify
part of code responsible for updating EntryHi during TLB exception.
Consequently EntryHi.EHINV is unexpectedly cleared on the exception.

Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
target-mips/helper.c

index 9fbca26d41cdda5de92e956bf898b40019a5c6c8..c864b15b97a84432167f6683618449fe68c0f30c 100644 (file)
@@ -396,6 +396,7 @@ static void raise_mmu_exception(CPUMIPSState *env, target_ulong address,
     env->CP0_Context = (env->CP0_Context & ~0x007fffff) |
                        ((address >> 9) & 0x007ffff0);
     env->CP0_EntryHi = (env->CP0_EntryHi & env->CP0_EntryHi_ASID_mask) |
+                       (env->CP0_EntryHi & (1 << CP0EnHi_EHINV)) |
                        (address & (TARGET_PAGE_MASK << 1));
 #if defined(TARGET_MIPS64)
     env->CP0_EntryHi &= env->SEGMask;