From 0305d194be1dbda09fa7a7c883894030d07c355f Mon Sep 17 00:00:00 2001 From: Yongbok Kim Date: Wed, 20 Jun 2018 13:05:47 +0100 Subject: [PATCH] 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 --- target/mips/translate.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- GitLab