aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-03-29 13:43:06 +1030
committerAlan Modra <amodra@gmail.com>2017-03-29 22:55:18 +1030
commit52be03fd13a26ecda4f27c451a434f19eded0ca6 (patch)
tree236169364ac9f5d4c80e21ddeadeff1bf9ea6084 /gas/config
parente643cb45bf85fa5c8c49a89ff177de246af4212e (diff)
downloadgdb-52be03fd13a26ecda4f27c451a434f19eded0ca6.zip
gdb-52be03fd13a26ecda4f27c451a434f19eded0ca6.tar.gz
gdb-52be03fd13a26ecda4f27c451a434f19eded0ca6.tar.bz2
PowerPC -Mraw disassembly
This adds -Mraw for PowerPC objdump, a disassembler option to display the underlying machine instruction rather than aliases. For example, "rlwinm" always rather than "rotlwi" when the instruction is performing a simple rotate. binutils/ * doc/binutils.texi (objdump): Document PowerPC -M options. gas/ * config/tc-ppc.c (md_parse_option): Reject -mraw. include/ * opcode/ppc.h (PPC_OPCODE_RAW): Define. (PPC_OPCODE_*): Make them all unsigned long long constants. opcodes/ * ppc-dis.c (ppc_opts): Set PPC_OPCODE_PPC for "any" flags. Add "raw" option. (lookup_powerpc): Don't special case -1 dialect. Handle PPC_OPCODE_RAW. (print_insn_powerpc): Mask out PPC_OPCODE_ANY on first lookup_powerpc call, pass it on second.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-ppc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 05e2c73..47cc875 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -1193,7 +1193,8 @@ md_parse_option (int c, const char *arg)
case 'm':
new_cpu = ppc_parse_cpu (ppc_cpu, &sticky, arg);
- if (new_cpu != 0)
+ /* "raw" is only valid for the disassembler. */
+ if (new_cpu != 0 && (new_cpu & PPC_OPCODE_RAW) == 0)
{
ppc_cpu = new_cpu;
if (strcmp (arg, "vle") == 0)