public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: ppc: pull default switch return out
@ 2022-11-10 7:30 Michael Frysinger
0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2022-11-10 7:30 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=99961e814f795e4e4fd40e5f7f5bae52150963d5
commit 99961e814f795e4e4fd40e5f7f5bae52150963d5
Author: Mike Frysinger <vapier@gentoo.org>
Date: Thu Nov 10 02:12:42 2022 +0700
sim: ppc: pull default switch return out
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");
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-10 7:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10 7:30 [binutils-gdb] sim: ppc: pull default switch return out Michael Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).