target/mips: Don't update BadVAddr register in Debug Mode

BadVAddr should not be updated if (env->hflags & MIPS_HFLAG_DM) is
set.

Backports commit e807bcc1513f2d79c992a08b252fa32e69c6e8b2 from qemu
This commit is contained in:
Yongbok Kim 2018-08-17 14:24:11 -04:00 committed by Lioncash
parent dbebd7f27f
commit 9be6d4c6d2
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -491,7 +491,9 @@ static void raise_mmu_exception(CPUMIPSState *env, target_ulong address,
break;
}
/* Raise exception */
env->CP0_BadVAddr = address;
if (!(env->hflags & MIPS_HFLAG_DM)) {
env->CP0_BadVAddr = address;
}
env->CP0_Context = (env->CP0_Context & ~0x007fffff) |
((address >> 9) & 0x007ffff0);
env->CP0_EntryHi = (env->CP0_EntryHi & env->CP0_EntryHi_ASID_mask) |