From dd7efa79151ed5a56caccfac870865764d922a2f Mon Sep 17 00:00:00 2001 From: Peter Bergner Date: Tue, 15 May 2018 16:48:14 -0500 Subject: PowerPC add initial -mfuture instruction support This patch adds initial 64-bit insn assembler/disassembler support. The only instruction added is "pnop" along with the automatic aligning of prefix instruction so they do not cross 64-byte boundaries. include/ * dis-asm.h (WIDE_OUTPUT): Define. * opcode/ppc.h (prefix_opcodes, prefix_num_opcodes): Declare. (PPC_OPCODE_POWERXX, PPC_GET_PREFIX, PPC_GET_SUFFIX), (PPC_PREFIX_P, PPC_PREFIX_SEG): Define. opcodes/ * ppc-dis.c (ppc_opts): Add "future" entry. (PREFIX_OPCD_SEGS): Define. (prefix_opcd_indices): New array. (disassemble_init_powerpc): Initialize prefix_opcd_indices. (lookup_prefix): New function. (print_insn_powerpc): Handle 64-bit prefix instructions. * ppc-opc.c (PREFIX_OP, PREFIX_FORM, SUFFIX_MASK, PREFIX_MASK), (PMRR, POWERXX): Define. (prefix_opcodes): New instruction table. (prefix_num_opcodes): New constant. binutils/ * objdump.c (disassemble_bytes): Set WIDE_OUTPUT in flags. gas/ * config/tc-ppc.c (ppc_setup_opcodes): Handle prefix_opcodes. (struct insn_label_list): New. (insn_labels, free_insn_labels): New variables. (ppc_record_label, ppc_clear_labels, ppc_start_line_hook): New funcs. (ppc_frob_label, ppc_new_dot_label): Move functions earlier in file and call ppc_record_label. (md_assemble): Handle 64-bit prefix instructions. Align labels that are on the same line as a prefix instruction. * config/tc-ppc.h (tc_frob_label, ppc_frob_label): Move to later in the file. (md_start_line_hook): Define. (ppc_start_line_hook): Declare. * testsuite/gas/ppc/prefix-align.d, * testsuite/gas/ppc/prefix-align.s: New test. * testsuite/gas/ppc/ppc.exp: Run new test. --- binutils/ChangeLog | 4 ++++ binutils/objdump.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'binutils') diff --git a/binutils/ChangeLog b/binutils/ChangeLog index b9aeb21..79bfaee 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2019-05-24 Alan Modra + + * objdump.c (disassemble_bytes): Set WIDE_OUTPUT in flags. + 2019-05-23 Jose E. Marchesi * MAINTAINERS: Add myself as the maintainer for BPF. diff --git a/binutils/objdump.c b/binutils/objdump.c index 05d503e..7381e48 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -1946,7 +1946,8 @@ disassemble_bytes (struct disassemble_info * inf, inf->stream = &sfile; inf->bytes_per_line = 0; inf->bytes_per_chunk = 0; - inf->flags = disassemble_all ? DISASSEMBLE_DATA : 0; + inf->flags = ((disassemble_all ? DISASSEMBLE_DATA : 0) + | (wide_output ? WIDE_OUTPUT : 0)); if (machine) inf->flags |= USER_SPECIFIED_MACHINE_TYPE; -- cgit v1.1