From: Nick Clifton <nickc@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] opcodes: SH fix bank register disassemble.
Date: Thu, 22 Sep 2022 11:41:10 +0000 (GMT) [thread overview]
Message-ID: <20220922114110.4F2443858422@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3b8e069a3691adc1a93ca7f4bcb5e8e687317108
commit 3b8e069a3691adc1a93ca7f4bcb5e8e687317108
Author: Yoshinori Sato <ysato@users.sourceforge.jp>
Date: Thu Sep 22 12:40:43 2022 +0100
opcodes: SH fix bank register disassemble.
* sh-dis.c (print_insn_sh): Enforce bit7 of LDC Rm,Rn_BANK and STC
Rm_BANK,Rn is always 1.
Diff:
---
opcodes/ChangeLog | 5 +++++
opcodes/sh-dis.c | 2 ++
2 files changed, 7 insertions(+)
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 1a23be86d70..bbd3544b83d 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2022-09-22 Yoshinori Sato <ysato@users.sourceforge.jp>
+
+ * sh-dis.c (print_insn_sh): Enforce bit7 of LDC Rm,Rn_BANK and STC
+ Rm_BANK,Rn is always 1.
+
2022-07-21 Peter Bergner <bergner@linux.ibm.com>
* ppc-opc.c (XACC_MASK, XX3ACC_MASK): New defines.
diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c
index 0e46cb6f4d9..49dbc23d920 100644
--- a/opcodes/sh-dis.c
+++ b/opcodes/sh-dis.c
@@ -645,6 +645,8 @@ print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
rm = (nibs[n] & 0x3);
break;
case REG_B:
+ if (!(nibs[n] & 0x08)) /* Must always be 1. */
+ goto fail;
rb = nibs[n] & 0x07;
break;
case SDT_REG_N:
reply other threads:[~2022-09-22 11:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220922114110.4F2443858422@sourceware.org \
--to=nickc@sourceware.org \
--cc=bfd-cvs@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).