From patchwork Thu Dec 21 05:03:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82623 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 427AA3861868 for ; Thu, 21 Dec 2023 05:03:32 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id C2A193858286 for ; Thu, 21 Dec 2023 05:03:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C2A193858286 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C2A193858286 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703134999; cv=none; b=FKZYVRxKVKdrVQS+AH73bTVUYIdIxxi2FGOt63peVNQ9Zw1vFz1pIVyvKQPhtCmn4A8hYIe20Y/8StME9zeM2gpYn1+7sPe9Bzit+PmE0zCGJeqLxiRXbn5Ir3gOue2VZ1Uu6Z2+4/JTwWG6LXSALhucRmR+WQ13D5bEbMHPtGc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703134999; c=relaxed/simple; bh=H81a0FSSfvq9e3PEPCYKkId7waKa//ypB99PimuTutY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=tyJawxbvLLzirnMNsH3bwveRy/y/7HYD/WCDqyl4y6/HXnYALLjgWq9gCzicwuZRwtB76+ngJ/pzjH9pxbGu57SObDeutsdETlmYgSTQ1i51PJ5bV+6sjaXdLJMUbyrKPr419gVPG+6nguY2DF9uv3eUnDKvnm3e8bhH6KEMtPQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 3247E340943; Thu, 21 Dec 2023 05:03:17 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/committed 1/3] sim: bfin: clean up astat reg name decode a little Date: Thu, 21 Dec 2023 00:03:13 -0500 Message-ID: <20231221050315.23130-1-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org The compiler pointed out we checked AZ twice. Sort by name to avoid that in the future, and to make it clearer that we have coverage of all the bits. And add the bits we were missing. The order here doesn't matter as it's just turning a pointer into a human readable string when store tracing is enabled. --- sim/bfin/bfin-sim.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/sim/bfin/bfin-sim.c b/sim/bfin/bfin-sim.c index 4fa5ccc315c7..1a9b499ebb4c 100644 --- a/sim/bfin/bfin-sim.c +++ b/sim/bfin/bfin-sim.c @@ -504,6 +504,16 @@ get_store_name (SIM_CPU *cpu, bu32 *p) return greg_names[4 * 8 + 2]; else if (p == &AWREG (1)) return greg_names[4 * 8 + 3]; + else if (p == &ASTATREG (ac0)) + return "ASTAT[ac0]"; + else if (p == &ASTATREG (ac0_copy)) + return "ASTAT[ac0_copy]"; + else if (p == &ASTATREG (ac1)) + return "ASTAT[ac1]"; + else if (p == &ASTATREG (an)) + return "ASTAT[an]"; + else if (p == &ASTATREG (aq)) + return "ASTAT[aq]"; else if (p == &ASTATREG (av0)) return "ASTAT[av0]"; else if (p == &ASTATREG (av0s)) @@ -512,22 +522,14 @@ get_store_name (SIM_CPU *cpu, bu32 *p) return "ASTAT[av1]"; else if (p == &ASTATREG (av1s)) return "ASTAT[av1s]"; + else if (p == &ASTATREG (az)) + return "ASTAT[az]"; else if (p == &ASTATREG (v)) return "ASTAT[v]"; - else if (p == &ASTATREG (vs)) - return "ASTAT[vs]"; else if (p == &ASTATREG (v_copy)) return "ASTAT[v_copy]"; - else if (p == &ASTATREG (az)) - return "ASTAT[az]"; - else if (p == &ASTATREG (an)) - return "ASTAT[an]"; - else if (p == &ASTATREG (az)) - return "ASTAT[az]"; - else if (p == &ASTATREG (ac0)) - return "ASTAT[ac0]"; - else if (p == &ASTATREG (ac0_copy)) - return "ASTAT[ac0_copy]"; + else if (p == &ASTATREG (vs)) + return "ASTAT[vs]"; else { /* Worry about this when we start to STORE() it. */ From patchwork Thu Dec 21 05:03:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82625 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3FEF33861875 for ; Thu, 21 Dec 2023 05:03:46 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id B3E4838582BD for ; Thu, 21 Dec 2023 05:03:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B3E4838582BD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B3E4838582BD Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703135000; cv=none; b=dnOSpi+ud9pTrSNZE6pnkKtHp+2dnynISiWVdBQl9bHIRsFt26ZEqcYtAKUiBjTowxjeRbcpj1uqxQ+xY9XA9aax1IB7ILV0rGTcHRwsGKVnK5c77zSTI1f8eq2Y0Z7c2sll4ZkkFlwrKBYzh/Qo2++DjDVb4ZpuDOGniFSnDGk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703135000; c=relaxed/simple; bh=CeDLiZzUrCxEd8gqP27+x1YCDnwQugLSGngn421997o=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=IS9K4ymIPj81cwPxzhtsM/1Sfb7vGtMg2/4CG0oQ+v0aEzftl8zmOKBYoTha7t2yieznWEPd6LUCieCAK7YHlrRpZ+jSt3tlhW/0MMYQmtfTljIEMs9z/KioDNZFxDqVI8PDhOG3QPR8EPU8Qol+4Gt95O+y8f7jN6Fia21V7I8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 64BEE340943; Thu, 21 Dec 2023 05:03:19 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/ccommitted 2/3] sim: mn10300: fix LAST_TIMER_REG typo Date: Thu, 21 Dec 2023 00:03:14 -0500 Message-ID: <20231221050315.23130-2-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231221050315.23130-1-vapier@gentoo.org> References: <20231221050315.23130-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org The compiler pointed out that we're testing LAST_TIMER_REG and LAST_COUNTER which are the same value ... and that's because we set LAST_TIMER_REG to the wrong register. Fix the typo. --- sim/mn10300/dv-mn103tim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/mn10300/dv-mn103tim.c b/sim/mn10300/dv-mn103tim.c index 95ebc82b9e04..b1844a68e37e 100644 --- a/sim/mn10300/dv-mn103tim.c +++ b/sim/mn10300/dv-mn103tim.c @@ -86,7 +86,7 @@ enum timer_register_types { TM6MDB, TM6CA, TM6CB, - LAST_TIMER_REG = TM6BC, + LAST_TIMER_REG = TM6CB, }; From patchwork Thu Dec 21 05:03:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82624 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B4A63861869 for ; Thu, 21 Dec 2023 05:03:35 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id E4F63386186B for ; Thu, 21 Dec 2023 05:03:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E4F63386186B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E4F63386186B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703135003; cv=none; b=UPNDRHJav5N+8aCjUfM6XVBq6D0kNijPCO6TT1oYAkRXGWjOZFgrh2kIPDtXWLGDsOXX1BUIDfGxl6HQu0559qvruTdG0gpNGnYwZK7nvBTJ8/DXb4jOSCSZNR90FCc5i9sIBmGcSo1WuazuLfNDabY0LxdMqe25aoKnG7ALSBI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703135003; c=relaxed/simple; bh=+jOweSfgIw5mPEc/usk6sG/Ou3Uhr1bCdSbAWZOuSBg=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=OVMHrv4IUE2D9lB8XLjkXPcuiuUFjH9phGqjp1JscylWeTH05LidgS3rj3aYlu0Zi6W91O2aaWLyPXDZRQi826RP9s+tNa2FWmvA9XYywqngveR3xxiLdMYyr8yHY94WYKg8kXI9mhAkA2gdcTE3zztgGCx2B+TAdounnb358iQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 79ABF340943; Thu, 21 Dec 2023 05:03:21 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH/committed 3/3] sim: warnings: enable -Wduplicated-cond Date: Thu, 21 Dec 2023 00:03:15 -0500 Message-ID: <20231221050315.23130-3-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231221050315.23130-1-vapier@gentoo.org> References: <20231221050315.23130-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org --- sim/configure | 1 + sim/m4/sim_ac_option_warnings.m4 | 1 + 2 files changed, 2 insertions(+) diff --git a/sim/m4/sim_ac_option_warnings.m4 b/sim/m4/sim_ac_option_warnings.m4 index 7bcf9af7804f..9f1487f93d0c 100644 --- a/sim/m4/sim_ac_option_warnings.m4 +++ b/sim/m4/sim_ac_option_warnings.m4 @@ -44,6 +44,7 @@ build_warnings="-Wall -Wpointer-arith dnl C++ -Wno-mismatched-tags -Wno-error=deprecated-register dnl C++ -Wsuggest-override +-Wduplicated-cond dnl C++ -Wdeprecated-copy dnl C++ -Wdeprecated-copy-dtor dnl C++ -Wredundant-move