From b89807c67baf4f31125d151f2dc3532b3420964d Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Mon, 1 Feb 2016 18:21:37 +0000 Subject: epiphany/disassembler: Improve alignment of output. Always set the bytes_per_line field (of struct disassemble_info) to the same constant value, this is inline with the advice contained within include/dis-asm.h. Setting this field to a constant value will cause the disassembler output to be better aligned. cpu/ChangeLog: * epiphany.opc (epiphany_print_insn): Set info->bytes_per_line to a constant to better align disassembler output. opcodes/ChangeLog: * epiphany-dis.c: Regenerated from latest cpu files. gas/ChangeLog: * testsuite/gas/epiphany/sample.d: Update expected output. --- cpu/ChangeLog | 5 +++++ cpu/epiphany.opc | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'cpu') diff --git a/cpu/ChangeLog b/cpu/ChangeLog index 3e01aea..3d39b91 100644 --- a/cpu/ChangeLog +++ b/cpu/ChangeLog @@ -1,3 +1,8 @@ +2016-02-02 Andrew Burgess + + * epiphany.opc (epiphany_print_insn): Set info->bytes_per_line to + a constant to better align disassembler output. + 2014-07-20 Stefan Kristiansson * or1korbis.cpu (l-msync, l-psync, l-csync): New instructions. diff --git a/cpu/epiphany.opc b/cpu/epiphany.opc index fefb396..903eccf 100644 --- a/cpu/epiphany.opc +++ b/cpu/epiphany.opc @@ -349,15 +349,16 @@ epiphany_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info) int status; info->bytes_per_chunk = 2; + info->bytes_per_line = 4; /* Attempt to read the base part of the insn. */ - info->bytes_per_line = buflen = cd->base_insn_bitsize / 8; + buflen = cd->base_insn_bitsize / 8; status = (*info->read_memory_func) (pc, buf, buflen, info); /* Try again with the minimum part, if min < base. */ if (status != 0 && (cd->min_insn_bitsize < cd->base_insn_bitsize)) { - info->bytes_per_line = buflen = cd->min_insn_bitsize / 8; + buflen = cd->min_insn_bitsize / 8; status = (*info->read_memory_func) (pc, buf, buflen, info); } -- cgit v1.1