From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlKFG-0004Z5-VN for qemu-devel@nongnu.org; Mon, 03 Nov 2014 11:12:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlKFB-0005a6-RO for qemu-devel@nongnu.org; Mon, 03 Nov 2014 11:12:42 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:12890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlKFB-0005Zu-Mg for qemu-devel@nongnu.org; Mon, 03 Nov 2014 11:12:37 -0500 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 797AE8409458A for ; Mon, 3 Nov 2014 16:12:34 +0000 (GMT) From: Leon Alrae Date: Mon, 3 Nov 2014 16:11:33 +0000 Message-ID: <1415031108-15039-20-git-send-email-leon.alrae@imgtec.com> In-Reply-To: <1415031108-15039-1-git-send-email-leon.alrae@imgtec.com> References: <1415031108-15039-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PULL 19/34] target-mips: stop translation after ctc1 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Yongbok Kim From: Yongbok Kim stop translation as ctc1 instruction can change hflags Reviewed-by: James Hogan Signed-off-by: Yongbok Kim Signed-off-by: Leon Alrae --- target-mips/translate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target-mips/translate.c b/target-mips/translate.c index 9a8f5c9..b388ba5 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -7490,12 +7490,15 @@ static void gen_mttr(CPUMIPSState *env, DisasContext *ctx, int rd, int rt, break; case 3: /* XXX: For now we support only a single FPU context. */ + save_cpu_state(ctx, 1); { TCGv_i32 fs_tmp = tcg_const_i32(rd); gen_helper_0e2i(ctc1, t0, fs_tmp, rt); tcg_temp_free_i32(fs_tmp); } + /* Stop translation as we may have changed hflags */ + ctx->bstate = BS_STOP; break; /* COP2: Not implemented. */ case 4: @@ -8089,12 +8092,15 @@ static void gen_cp1 (DisasContext *ctx, uint32_t opc, int rt, int fs) break; case OPC_CTC1: gen_load_gpr(t0, rt); + save_cpu_state(ctx, 1); { TCGv_i32 fs_tmp = tcg_const_i32(fs); gen_helper_0e2i(ctc1, t0, fs_tmp, rt); tcg_temp_free_i32(fs_tmp); } + /* Stop translation as we may have changed hflags */ + ctx->bstate = BS_STOP; opn = "ctc1"; break; #if defined(TARGET_MIPS64) -- 2.1.0