From patchwork Mon Mar 20 13:00:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yongbok Kim X-Patchwork-Id: 9634103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 372D2602D6 for ; Mon, 20 Mar 2017 13:06:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21A3E27D0C for ; Mon, 20 Mar 2017 13:06:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1607427F95; Mon, 20 Mar 2017 13:06:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AAB9B27D0C for ; Mon, 20 Mar 2017 13:06:15 +0000 (UTC) Received: from localhost ([::1]:32904 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpx0o-0007w5-6z for patchwork-qemu-devel@patchwork.kernel.org; Mon, 20 Mar 2017 09:06:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpwvV-0003ui-O8 for qemu-devel@nongnu.org; Mon, 20 Mar 2017 09:00:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cpwvT-00071G-A0 for qemu-devel@nongnu.org; Mon, 20 Mar 2017 09:00:45 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:36224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpwvT-00070o-04 for qemu-devel@nongnu.org; Mon, 20 Mar 2017 09:00:43 -0400 Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Forcepoint Email with ESMTPS id 47390BFAE265B; Mon, 20 Mar 2017 13:00:37 +0000 (GMT) Received: from localhost.localdomain (192.168.161.53) by hhmail02.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0; Mon, 20 Mar 2017 13:00:40 +0000 From: Yongbok Kim To: QEMU Developers Date: Mon, 20 Mar 2017 13:00:20 +0000 Message-ID: <1490014826-4472-5-git-send-email-yongbok.kim@imgtec.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1490014826-4472-1-git-send-email-yongbok.kim@imgtec.com> References: <1490014826-4472-1-git-send-email-yongbok.kim@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.161.53] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 195.59.15.196 Subject: [Qemu-devel] [PULL for v2.9 04/10] target-mips: replace break by goto cp0_unimplemented X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Philippe Mathieu-Daudé this fixes many warnings like: target/mips/translate.c:6253:13: warning: Value stored to 'rn' is never read rn = "invalid sel"; ^ ~~~~~~~~~~~~~ Reported-by: Clang Static Analyzer Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Yongbok Kim Signed-off-by: Yongbok Kim --- target/mips/translate.c | 88 ++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index 5c030a9..fc11e15 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -5458,19 +5458,19 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel) case 1: // gen_helper_mfc0_tracecontrol(arg); /* PDtrace support */ rn = "TraceControl"; -// break; + goto cp0_unimplemented; case 2: // gen_helper_mfc0_tracecontrol2(arg); /* PDtrace support */ rn = "TraceControl2"; -// break; + goto cp0_unimplemented; case 3: // gen_helper_mfc0_usertracedata(arg); /* PDtrace support */ rn = "UserTraceData"; -// break; + goto cp0_unimplemented; case 4: // gen_helper_mfc0_tracebpc(arg); /* PDtrace support */ rn = "TraceBPC"; -// break; + goto cp0_unimplemented; default: goto cp0_unimplemented; } @@ -5496,31 +5496,31 @@ static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel) case 1: // gen_helper_mfc0_performance1(arg); rn = "Performance1"; -// break; + goto cp0_unimplemented; case 2: // gen_helper_mfc0_performance2(arg); rn = "Performance2"; -// break; + goto cp0_unimplemented; case 3: // gen_helper_mfc0_performance3(arg); rn = "Performance3"; -// break; + goto cp0_unimplemented; case 4: // gen_helper_mfc0_performance4(arg); rn = "Performance4"; -// break; + goto cp0_unimplemented; case 5: // gen_helper_mfc0_performance5(arg); rn = "Performance5"; -// break; + goto cp0_unimplemented; case 6: // gen_helper_mfc0_performance6(arg); rn = "Performance6"; -// break; + goto cp0_unimplemented; case 7: // gen_helper_mfc0_performance7(arg); rn = "Performance7"; -// break; + goto cp0_unimplemented; default: goto cp0_unimplemented; } @@ -6116,13 +6116,13 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel) rn = "TraceControl"; /* Stop translation as we may have switched the execution mode */ ctx->bstate = BS_STOP; -// break; + goto cp0_unimplemented; case 2: // gen_helper_mtc0_tracecontrol2(cpu_env, arg); /* PDtrace support */ rn = "TraceControl2"; /* Stop translation as we may have switched the execution mode */ ctx->bstate = BS_STOP; -// break; + goto cp0_unimplemented; case 3: /* Stop translation as we may have switched the execution mode */ ctx->bstate = BS_STOP; @@ -6130,13 +6130,13 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel) rn = "UserTraceData"; /* Stop translation as we may have switched the execution mode */ ctx->bstate = BS_STOP; -// break; + goto cp0_unimplemented; case 4: // gen_helper_mtc0_tracebpc(cpu_env, arg); /* PDtrace support */ /* Stop translation as we may have switched the execution mode */ ctx->bstate = BS_STOP; rn = "TraceBPC"; -// break; + goto cp0_unimplemented; default: goto cp0_unimplemented; } @@ -6161,31 +6161,31 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel) case 1: // gen_helper_mtc0_performance1(arg); rn = "Performance1"; -// break; + goto cp0_unimplemented; case 2: // gen_helper_mtc0_performance2(arg); rn = "Performance2"; -// break; + goto cp0_unimplemented; case 3: // gen_helper_mtc0_performance3(arg); rn = "Performance3"; -// break; + goto cp0_unimplemented; case 4: // gen_helper_mtc0_performance4(arg); rn = "Performance4"; -// break; + goto cp0_unimplemented; case 5: // gen_helper_mtc0_performance5(arg); rn = "Performance5"; -// break; + goto cp0_unimplemented; case 6: // gen_helper_mtc0_performance6(arg); rn = "Performance6"; -// break; + goto cp0_unimplemented; case 7: // gen_helper_mtc0_performance7(arg); rn = "Performance7"; -// break; + goto cp0_unimplemented; default: goto cp0_unimplemented; } @@ -6766,19 +6766,19 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel) case 1: // gen_helper_dmfc0_tracecontrol(arg, cpu_env); /* PDtrace support */ rn = "TraceControl"; -// break; + goto cp0_unimplemented; case 2: // gen_helper_dmfc0_tracecontrol2(arg, cpu_env); /* PDtrace support */ rn = "TraceControl2"; -// break; + goto cp0_unimplemented; case 3: // gen_helper_dmfc0_usertracedata(arg, cpu_env); /* PDtrace support */ rn = "UserTraceData"; -// break; + goto cp0_unimplemented; case 4: // gen_helper_dmfc0_tracebpc(arg, cpu_env); /* PDtrace support */ rn = "TraceBPC"; -// break; + goto cp0_unimplemented; default: goto cp0_unimplemented; } @@ -6803,31 +6803,31 @@ static void gen_dmfc0(DisasContext *ctx, TCGv arg, int reg, int sel) case 1: // gen_helper_dmfc0_performance1(arg); rn = "Performance1"; -// break; + goto cp0_unimplemented; case 2: // gen_helper_dmfc0_performance2(arg); rn = "Performance2"; -// break; + goto cp0_unimplemented; case 3: // gen_helper_dmfc0_performance3(arg); rn = "Performance3"; -// break; + goto cp0_unimplemented; case 4: // gen_helper_dmfc0_performance4(arg); rn = "Performance4"; -// break; + goto cp0_unimplemented; case 5: // gen_helper_dmfc0_performance5(arg); rn = "Performance5"; -// break; + goto cp0_unimplemented; case 6: // gen_helper_dmfc0_performance6(arg); rn = "Performance6"; -// break; + goto cp0_unimplemented; case 7: // gen_helper_dmfc0_performance7(arg); rn = "Performance7"; -// break; + goto cp0_unimplemented; default: goto cp0_unimplemented; } @@ -7417,25 +7417,25 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel) /* Stop translation as we may have switched the execution mode */ ctx->bstate = BS_STOP; rn = "TraceControl"; -// break; + goto cp0_unimplemented; case 2: // gen_helper_mtc0_tracecontrol2(cpu_env, arg); /* PDtrace support */ /* Stop translation as we may have switched the execution mode */ ctx->bstate = BS_STOP; rn = "TraceControl2"; -// break; + goto cp0_unimplemented; case 3: // gen_helper_mtc0_usertracedata(cpu_env, arg); /* PDtrace support */ /* Stop translation as we may have switched the execution mode */ ctx->bstate = BS_STOP; rn = "UserTraceData"; -// break; + goto cp0_unimplemented; case 4: // gen_helper_mtc0_tracebpc(cpu_env, arg); /* PDtrace support */ /* Stop translation as we may have switched the execution mode */ ctx->bstate = BS_STOP; rn = "TraceBPC"; -// break; + goto cp0_unimplemented; default: goto cp0_unimplemented; } @@ -7460,31 +7460,31 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel) case 1: // gen_helper_mtc0_performance1(cpu_env, arg); rn = "Performance1"; -// break; + goto cp0_unimplemented; case 2: // gen_helper_mtc0_performance2(cpu_env, arg); rn = "Performance2"; -// break; + goto cp0_unimplemented; case 3: // gen_helper_mtc0_performance3(cpu_env, arg); rn = "Performance3"; -// break; + goto cp0_unimplemented; case 4: // gen_helper_mtc0_performance4(cpu_env, arg); rn = "Performance4"; -// break; + goto cp0_unimplemented; case 5: // gen_helper_mtc0_performance5(cpu_env, arg); rn = "Performance5"; -// break; + goto cp0_unimplemented; case 6: // gen_helper_mtc0_performance6(cpu_env, arg); rn = "Performance6"; -// break; + goto cp0_unimplemented; case 7: // gen_helper_mtc0_performance7(cpu_env, arg); rn = "Performance7"; -// break; + goto cp0_unimplemented; default: goto cp0_unimplemented; }