From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 4AD253858D1E; Thu, 10 Nov 2022 07:30:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4AD253858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668065445; bh=FMpbZ943ZtAqvo1GlKAI/1ohFhmQUyKHIn4Z9S8azow=; h=From:To:Subject:Date:From; b=ewCFQsjOlkYvG4QKUdJJcc+c1PyUtNVzkdyGZ3hgtXFMfeHugItP97JlJLheLPxjk cis4ksLapqpr2XN4f+lydNWRa4POG+9tUZqRQX9BXzFPrkET7PvkS6SBLc8qatjCYW msUhVQNpKNW8V5ghvIq3U9lTm17flsVhcQ+0auP8= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim: ppc: pull default switch return out X-Act-Checkin: binutils-gdb X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 23af236b63a96738c195d2544abfc85552abd0a2 X-Git-Newrev: 99961e814f795e4e4fd40e5f7f5bae52150963d5 Message-Id: <20221110073045.4AD253858D1E@sourceware.org> Date: Thu, 10 Nov 2022 07:30:45 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D99961e814f79= 5e4e4fd40e5f7f5bae52150963d5 commit 99961e814f795e4e4fd40e5f7f5bae52150963d5 Author: Mike Frysinger Date: Thu Nov 10 02:12:42 2022 +0700 sim: ppc: pull default switch return out =20 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. Diff: --- 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 0f9b02f9108..0cc210b5fed 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"); }