From: Yongbok Kim Date: Wed, 20 Jun 2018 12:05:47 +0000 (+0100) Subject: target/mips: Fix microMIPS on reset X-Git-Tag: qemu-xen-4.12.0-rc1~130^2~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0305d194be1dbda09fa7a7c883894030d07c355f;p=qemu-xen.git target/mips: Fix microMIPS on reset Fix to activate microMIPS on reset when Config3.ISA == {1, 3} Signed-off-by: Yongbok Kim Reviewed-by: Aleksandar Markovic Signed-off-by: Aleksandar Markovic --- diff --git a/target/mips/translate.c b/target/mips/translate.c index e57d71e485..2eb211ae8c 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -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);