From patchwork Wed Oct 29 01:41:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongbok Kim X-Patchwork-Id: 404391 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8482F140077 for ; Wed, 29 Oct 2014 12:47:35 +1100 (AEDT) Received: from localhost ([::1]:42157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjIMF-00046D-Ox for incoming@patchwork.ozlabs.org; Tue, 28 Oct 2014 21:47:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjIHI-0003se-6p for qemu-devel@nongnu.org; Tue, 28 Oct 2014 21:42:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjIHD-0000jg-0J for qemu-devel@nongnu.org; Tue, 28 Oct 2014 21:42:24 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:42709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjIHC-0000jY-QY for qemu-devel@nongnu.org; Tue, 28 Oct 2014 21:42:18 -0400 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 79F18114A9C09; Wed, 29 Oct 2014 01:42:16 +0000 (GMT) Received: from KLMAIL02.kl.imgtec.org (10.40.60.222) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 29 Oct 2014 01:42:16 +0000 Received: from hhmail02.hh.imgtec.org (10.100.10.20) by klmail02.kl.imgtec.org (10.40.60.222) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 29 Oct 2014 01:42:16 +0000 Received: from localhost.localdomain (192.168.14.192) by hhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 29 Oct 2014 01:42:16 +0000 From: Yongbok Kim To: Date: Wed, 29 Oct 2014 01:41:53 +0000 Message-ID: <1414546928-54642-6-git-send-email-yongbok.kim@imgtec.com> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1414546928-54642-1-git-send-email-yongbok.kim@imgtec.com> References: <1414546928-54642-1-git-send-email-yongbok.kim@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.14.192] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.59.15.196 Cc: leon.alrae@imgtec.com, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH v2 05/20] target-mips: stop translation after ctc1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org stop translation as ctc1 instruction can change hflags Signed-off-by: Yongbok Kim Reviewed-by: James Hogan --- target-mips/translate.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) 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)