[PATCH/committed] sim: sh: refine pwsb & pwad nops

Message ID 20231224090032.29372-1-vapier@gentoo.org
State New
Headers
Series [PATCH/committed] sim: sh: refine pwsb & pwad nops |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged

Commit Message

Mike Frysinger Dec. 24, 2023, 9 a.m. UTC
  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(+)
  

Patch

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.  */",