From patchwork Sat Mar 4 18:56:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 9604231 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 3A0B160414 for ; Sat, 4 Mar 2017 19:01:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DDE42839C for ; Sat, 4 Mar 2017 19:01:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E9B92844C; Sat, 4 Mar 2017 19:01:54 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 3E53C2839C for ; Sat, 4 Mar 2017 19:01:53 +0000 (UTC) Received: from localhost ([::1]:36312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckEwB-0001gJ-Up for patchwork-qemu-devel@patchwork.kernel.org; Sat, 04 Mar 2017 14:01:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckEs3-0006sp-T7 for qemu-devel@nongnu.org; Sat, 04 Mar 2017 13:57:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckEs0-0008Et-R3 for qemu-devel@nongnu.org; Sat, 04 Mar 2017 13:57:35 -0500 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:32984) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ckEs0-0008El-MA for qemu-devel@nongnu.org; Sat, 04 Mar 2017 13:57:32 -0500 Received: by mail-qk0-x241.google.com with SMTP id j127so16936811qke.0 for ; Sat, 04 Mar 2017 10:57:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Qzc/iR4goD0DWigEWxBNYhQPFAdeddk7CvTjpHRdPsg=; b=srIM8L16CUSu2s8ogjKSPJHRjqfdJlpmIBEgg+zXTPc7qScnHKaP3yRHC+KKeiB34W k+DsVfTBg3uoLeLh2zTdyKL6eBng4WfCH93V1i+YqQ1A98dlTLl1PMElGwbiLGkwvkbu 6dN50C8BPC8TQ93eqnA4ceW89znMmxx0fAd81kgOnjMZQj5EjiGDvLZDOzfWHUnDsnfE VlmNlqYNUrcy8tMDj/u5dCK7Jx1EOHKJ+d+g68jSSaXJ/GH1S6LHSy934zgjTh5MSYJU gRUmqjd15HnZJkNpU7yjc+j3UTR7XAr3XDDxjxzAawzh3MPirNQ7qIqYPwYDAYlMu9S8 Abvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Qzc/iR4goD0DWigEWxBNYhQPFAdeddk7CvTjpHRdPsg=; b=Gesj2eJeFegXZfPTq+0Ja9hwoOsDsoKLHLSop7XI9ByiN0gR0scxYPVEAM0inR2l1C PSN5wFwC/0HI5vPv53Tfk6FJStnz8uo4dMCIS3PQ6/RPuN/8hyEoBMVjcQwe1AdddAdz mc7/RaLjRAT/2H3nzgb/NrDBVgy+fJOpr84/Y+PzeYJNOOyOlEUnVgZ8aSzL7fLjEKP/ aJMV+ZHSj4OW/oj1CV4uI5hS+whFjczJUWzCpwaQYKGprvOwD7ppi5ssTapkjwZ7FSm0 Bg82NxRNssm/97FBhQayy0B+D6rIofgYGIwDDTTdninQYX79gC1fs/SRnmwKDuHXbITT V1Tg== X-Gm-Message-State: AMke39nvomA7y37U3eMqL3nQQl7YlPUcd1eLlTJp5jttLSTqxJLcN3BFFRQKFs0Tu33SKA== X-Received: by 10.200.44.235 with SMTP id 40mr8935155qtx.178.1488653852092; Sat, 04 Mar 2017 10:57:32 -0800 (PST) Received: from yoga.lan ([138.117.48.226]) by smtp.gmail.com with ESMTPSA id k8sm10048006qke.54.2017.03.04.10.57.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Mar 2017 10:57:31 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Aurelien Jarno , Yongbok Kim Date: Sat, 4 Mar 2017 15:56:51 -0300 Message-Id: <20170304185652.10675-5-f4bug@amsat.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170304185652.10675-1-f4bug@amsat.org> References: <20170304185652.10675-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::241 Subject: [Qemu-devel] [PATCH 4/5] 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?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 5c030a90cd..fc11e15a17 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; }