public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] sim: sh: adjust some dsp insn masks
@ 2023-12-16  5:01 Michael Frysinger
  0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2023-12-16  5:01 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=82a398adb854dd602212e1007d76b187277b9823

commit 82a398adb854dd602212e1007d76b187277b9823
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Fri Dec 15 23:54:40 2023 -0500

    sim: sh: adjust some dsp insn masks
    
    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.

Diff:
---
 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 0a04e339fa1..2522ec124f8 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.  */",

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

only message in thread, other threads:[~2023-12-16  5:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-16  5:01 [binutils-gdb] sim: sh: adjust some dsp insn masks 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).