public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/committed 2/2] sim: sh: adjust some dsp insn masks
Date: Sat, 16 Dec 2023 00:00:47 -0500	[thread overview]
Message-ID: <20231216050047.13827-2-vapier@gentoo.org> (raw)
In-Reply-To: <20231216050047.13827-1-vapier@gentoo.org>

The pmuls encoding is incorrect -- it looks like a copy & paste error
from the padd pmuls variant.  The SuperH software manual covers this.

On the flip side, the manual lists pwsb & pwad as insns that exist,
but no description of what they do, what the insn name means, or the
actual encoding.  Our sim implementation stubs them both out as nops.
Let's mark the fields to avoid unused variable warnings.
---
 sim/sh/gencode.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index 0a04e339fa18..2522ec124f86 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -1915,7 +1915,7 @@ static op ppi_tab[] =
     "COMPUTE_OVERFLOW;",
     "greater_equal = 0;",
   },
-  { "","", "pmuls Se,Sf,Dg",	"0100eeffxxyygguu",
+  { "","", "pmuls Se,Sf,Dg",	"0100eeff0000gg00",
     "res = (DSP_R (e) >> 16) * (DSP_R (f) >> 16) * 2;",
     "if (res == 0x80000000)",
     "  res = 0x7fffffff;",
@@ -2011,9 +2011,9 @@ static op ppi_tab[] =
     "COMPUTE_OVERFLOW;",
     "ADD_SUB_GE;",
   },
-  { "","", "pwsb Sx,Sy,Dz",	"10100100xxyyzzzz",
+  { "","", "pwsb Sx,Sy,Dz",	"10100100....zzzz",
   },
-  { "","", "pwad Sx,Sy,Dz",	"10110100xxyyzzzz",
+  { "","", "pwad Sx,Sy,Dz",	"10110100....zzzz",
   },
   { "","", "(if cc) pabs Sx,Dz",	"100010ccxx01zzzz",
     "/* FIXME: duplicate code pabs.  */",
-- 
2.43.0


      reply	other threads:[~2023-12-16  5:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-16  5:00 [PATCH/committed 1/2] sim: sh: tidy up gencode slightly Mike Frysinger
2023-12-16  5:00 ` Mike Frysinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231216050047.13827-2-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).