]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/mips: Prevent switching mode related to Config3 ISA bit for nanoMIPS
authorStefan Markovic <smarkovic@wavecomp.com>
Mon, 20 Aug 2018 10:00:27 +0000 (12:00 +0200)
committerAleksandar Markovic <amarkovic@wavecomp.com>
Fri, 24 Aug 2018 15:51:59 +0000 (17:51 +0200)
Only if Config3.ISA is 3 (microMIPS), the mode should be switched in
cpu_state_reset(). Config3.ISA is 1 for nanoMIPS processors, and no mode
change should happen.

Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
target/mips/translate.c

index 4f95b9a6e8cc8ebe6b02a85555e2094508aecc8e..7fb322b47d08ff5cc88da26b43bcec6f1fd1cd6f 100644 (file)
@@ -21841,8 +21841,8 @@ void cpu_state_reset(CPUMIPSState *env)
         env->CP0_Status |= (1 << CP0St_FR);
     }
 
-    if (env->CP0_Config3 & (1 << CP0C3_ISA)) {
-        /*  microMIPS on reset when Config3.ISA == {1, 3} */
+    if (env->CP0_Config3 & (1 << CP0C3_ISA) & (1 << (CP0C3_ISA + 1))) {
+        /*  microMIPS on reset when Config3.ISA is 3 */
         env->hflags |= MIPS_HFLAG_M16;
     }