public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/committed] sim: sh: refine pwsb & pwad nops
@ 2023-12-24  9:00 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2023-12-24  9:00 UTC (permalink / raw)
  To: gdb-patches

Since these insns don't do anything and are effectively ignored,
return early to avoid doing any common processing at the end as
that requires initializing variables like "res" with something.
---
 sim/sh/gencode.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index 8ef3f3e33761..c121d53bb40b 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -2012,8 +2012,10 @@ static op ppi_tab[] =
     "ADD_SUB_GE;",
   },
   { "","", "pwsb Sx,Sy,Dz",	"10100100....zzzz",
+    "return;",
   },
   { "","", "pwad Sx,Sy,Dz",	"10110100....zzzz",
+    "return;",
   },
   { "","", "(if cc) pabs Sx,Dz",	"100010ccxx01zzzz",
     "/* FIXME: duplicate code pabs.  */",
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-24  9:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-24  9:00 [PATCH/committed] sim: sh: refine pwsb & pwad nops Mike 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).