public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: PR28959, obdump doesn't disassemble mftb instruction
Date: Mon, 14 Mar 2022 09:10:23 +1030	[thread overview]
Message-ID: <Yi5y17dkwdo5WI+P@squeak.grove.modra.org> (raw)

Without a -M cpu option given, powerpc objdump defaults currently to
-Mpower10 but -Many is also given.  Commit 1ff6a3b8e562 regressed
-Many disassembly of instructions that are encoded differently
depending on cpu, such as mftb which has pre- and post-power4
encodings.

	PR 28959
	* ppc-dis.c (lookup_powerpc): Revert 2021-05-28 change.  Instead
	only look at deprecated PPC_OPCODE_RAW bit when -Many.

diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index 07f4e34a657..38ddeca2623 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -598,8 +598,9 @@ lookup_powerpc (uint64_t insn, ppc_cpu_t dialect)
 
       if ((insn & opcode->mask) != opcode->opcode
 	  || ((dialect & PPC_OPCODE_ANY) == 0
-	      && (opcode->flags & dialect) == 0)
-	  || (opcode->deprecated & dialect) != 0)
+	      && ((opcode->flags & dialect) == 0
+		  || (opcode->deprecated & dialect) != 0))
+	  || (opcode->deprecated & dialect & PPC_OPCODE_RAW) != 0)
 	continue;
 
       /* Check validity of operands.  */

-- 
Alan Modra
Australia Development Lab, IBM

                 reply	other threads:[~2022-03-13 22:40 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=Yi5y17dkwdo5WI+P@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@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).