aboutsummaryrefslogtreecommitdiff
path: root/opcodes/ppc-dis.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-03-13 22:54:25 +1030
committerAlan Modra <amodra@gmail.com>2022-03-14 09:07:18 +1030
commitb508e46bf9c5b2cef5821b399dfc3b8009a81836 (patch)
tree2b14e413fad0f089cc5df34e1a70b5751372c1d0 /opcodes/ppc-dis.c
parent4f4a30bee6936a2ffdad777a73f86a6d20c3fbe0 (diff)
downloadgdb-b508e46bf9c5b2cef5821b399dfc3b8009a81836.zip
gdb-b508e46bf9c5b2cef5821b399dfc3b8009a81836.tar.gz
gdb-b508e46bf9c5b2cef5821b399dfc3b8009a81836.tar.bz2
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.
Diffstat (limited to 'opcodes/ppc-dis.c')
-rw-r--r--opcodes/ppc-dis.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index 07f4e34..38ddeca 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. */