]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/mips: Fix microMIPS on reset
authorYongbok Kim <yongbok.kim@mips.com>
Wed, 20 Jun 2018 12:05:47 +0000 (13:05 +0100)
committerAleksandar Markovic <amarkovic@wavecomp.com>
Wed, 27 Jun 2018 18:12:57 +0000 (20:12 +0200)
Fix to activate microMIPS on reset when Config3.ISA == {1, 3}

Signed-off-by: Yongbok Kim <yongbok.kim@mips.com>
Reviewed-by: Aleksandar Markovic <aleksandar.markovic@mips.com>
Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com>
target/mips/translate.c

index e57d71e485f8eb6a4786c69f2e70dac62c3ff1ff..2eb211ae8cdce49ba18d1bf740f9e066c23ecacb 100644 (file)
@@ -20713,6 +20713,11 @@ 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} */
+        env->hflags |= MIPS_HFLAG_M16;
+    }
+
     /* MSA */
     if (env->CP0_Config3 & (1 << CP0C3_MSAP)) {
         msa_reset(env);