From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 4AC083858D28 for ; Wed, 9 Nov 2022 20:01:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4AC083858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id DD63A340E71; Wed, 9 Nov 2022 20:01:33 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH 2/7] sim: ppc: pull default switch return out Date: Thu, 10 Nov 2022 03:01:21 +0700 Message-Id: <20221109200126.21090-2-vapier@gentoo.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221109200126.21090-1-vapier@gentoo.org> References: <20221109200126.21090-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This saves a single line for the same result. By itself, it's not interesting, but we can further optimize the generated output and completely omit the switch table in some cases. Which we'll do in follow up commits. --- sim/ppc/dgen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sim/ppc/dgen.c b/sim/ppc/dgen.c index 0f9b02f91084..0cc210b5fed1 100644 --- a/sim/ppc/dgen.c +++ b/sim/ppc/dgen.c @@ -248,9 +248,8 @@ gen_spreg_c(spreg_table *table, lf *file) else ASSERT(0); } - lf_printf(file, " default:\n"); - lf_printf(file, " return 0;\n"); lf_printf(file, " }\n"); + lf_printf(file, " return 0;\n"); } lf_printf(file, "}\n"); } -- 2.38.1