[binutils-gdb/binutils-2_37-branch] PR28959, obdump doesn't disassemble mftb instruction
Alan Modra
amodra@sourceware.org
Sun Mar 13 22:55:02 GMT 2022
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=feee8c08486a8668d2a7dac4df86a40fa0ebb39f
commit feee8c08486a8668d2a7dac4df86a40fa0ebb39f
Author: Alan Modra <amodra@gmail.com>
Date: Sun Mar 13 22:54:25 2022 +1030
PR28959, obdump doesn't disassemble mftb instruction
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.
(cherry picked from commit b508e46bf9c5b2cef5821b399dfc3b8009a81836)
Diff:
---
opcodes/ppc-dis.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index f25909d1c01..ae2f0c6e8cc 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. */
More information about the Binutils-cvs
mailing list