Hi Leon, thanks for spotting that. Done in v5.
Regards, Petar ________________________________________ From: Leon Alrae Sent: Wednesday, June 18, 2014 4:53 PM To: Petar Jovanovic; Aurelien Jarno; Petar Jovanovic Cc: r...@twiddle.net; qemu-devel@nongnu.org; afaer...@suse.de Subject: Re: [Qemu-devel] [v4 PATCH] target-mips: implement UserLocal Register Hi Petar, >> @@ -4214,7 +4215,17 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int >> reg, int sel) >> case 1: >> // gen_helper_mfc0_contextconfig(arg); /* SmartMIPS ASE */ >> rn = "ContextConfig"; >> + goto die; >> // break; >> + case 2: >> + if (ctx->ulri) { >> + tcg_gen_ld32s_tl(arg, cpu_env, >> + offsetof(CPUMIPSState, >> + active_tc.CP0_UserLocal)); >> + rn = "UserLocal"; >> + } else { >> + tcg_gen_movi_tl(arg, 0); >> + } >> default: >> goto die; >> } You forgot to put "break" at the end of the case - this leads to Reserved Instruction exception when trying to read the register. Regards, Leon