From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxHFN-0007KV-1r for qemu-devel@nongnu.org; Wed, 18 Jun 2014 10:54:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxHFF-0003gP-Ey for qemu-devel@nongnu.org; Wed, 18 Jun 2014 10:53:57 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:56473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxHFF-0003fs-9B for qemu-devel@nongnu.org; Wed, 18 Jun 2014 10:53:49 -0400 Message-ID: <53A1A7EF.7090105@imgtec.com> Date: Wed, 18 Jun 2014 15:53:35 +0100 From: Leon Alrae MIME-Version: 1.0 References: <1401385013-40740-1-git-send-email-petar.jovanovic@rt-rk.com>, <20140530080231.GA19124@ohm.rr44.fr> <56EA75BA695AE044ACFB41322F6D2BF44D9B61C4@BADAG02.ba.imgtec.org> In-Reply-To: <56EA75BA695AE044ACFB41322F6D2BF44D9B61C4@BADAG02.ba.imgtec.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [v4 PATCH] target-mips: implement UserLocal Register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Petar Jovanovic , Aurelien Jarno , Petar Jovanovic Cc: "qemu-devel@nongnu.org" , "afaerber@suse.de" , "rth@twiddle.net" 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