diff options
author | Alan Modra <amodra@gmail.com> | 2017-03-29 13:43:06 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-03-29 22:55:18 +1030 |
commit | 52be03fd13a26ecda4f27c451a434f19eded0ca6 (patch) | |
tree | 236169364ac9f5d4c80e21ddeadeff1bf9ea6084 /gas | |
parent | e643cb45bf85fa5c8c49a89ff177de246af4212e (diff) | |
download | fsf-binutils-gdb-52be03fd13a26ecda4f27c451a434f19eded0ca6.zip fsf-binutils-gdb-52be03fd13a26ecda4f27c451a434f19eded0ca6.tar.gz fsf-binutils-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')
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-ppc.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 1ec3708..f24e821 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2017-03-29 Alan Modra <amodra@gmail.com> + + * config/tc-ppc.c (md_parse_option): Reject -mraw. + 2017-03-27 Alan Modra <amodra@gmail.com> PR 21303 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) |