epiphany/disassembler: Improve alignment of output.
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 1 Feb 2016 18:21:37 +0000 (18:21 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 2 Feb 2016 11:09:17 +0000 (11:09 +0000)
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
cpu/epiphany.opc
gas/ChangeLog
gas/testsuite/gas/epiphany/sample.d
opcodes/ChangeLog
opcodes/epiphany-dis.c

index 3e01aea5c61a46b5441de6cf61902e5c0522a463..3d39b91b6d7a08acfd333d381de14bbaa00b2f84 100644 (file)
@@ -1,3 +1,8 @@
+2016-02-02  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * epiphany.opc (epiphany_print_insn): Set info->bytes_per_line to
+       a constant to better align disassembler output.
+
 2014-07-20  Stefan Kristiansson  <stefan.kristiansson@saunalahti.fi>
 
        * or1korbis.cpu (l-msync, l-psync, l-csync): New instructions.
index fefb396ebf988e3d9792d007bd597094e4e32444..903eccf275a7ae0ab4f67e7a97dd2b527e6c3c85 100644 (file)
@@ -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);
     }
 
index d219d4274062c8cd8ec0b87be52974978d7a6d9c..0416d6f3c60b2ba0bbc641eb26ba428493f82355 100644 (file)
@@ -1,3 +1,7 @@
+2016-02-02  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * testsuite/gas/epiphany/sample.d: Update expected output.
+
 2016-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
 
         * config/tc-arc.c (md_apply_fix): Allow addendum.
index 17b516394e555ac688164caa8f285ac4d379d6a6..d360363f6311c1ed53a2097a563b473458971557 100644 (file)
@@ -218,4 +218,4 @@ Disassembly of section \.text:
 
 0000019e \<trap\>:
  19e:  03e2            trap 0x0
- 1a0:  01d2    rti
+ 1a0:  01d2            rti
index 505b5e7cc08e203f22f474db7b65b3518d354d9e..da140496355d90b4ee3de568c0cf2e32b653c274 100644 (file)
@@ -1,3 +1,7 @@
+2016-02-02  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * epiphany-dis.c: Regenerated from latest cpu files.
+
 2016-02-01  Michael McConville  <mmcco@mykolab.com>
 
        * cgen-dis.c (count_decodable_bits): Use unsigned value for mask
index 1c424df2ab014ac71dac2d5a94b4f03318b7e394..2838b06b1284cb1359ff2fe78d084e8a914dc58b 100644 (file)
@@ -69,15 +69,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);
     }
 
This page took 0.034015 seconds and 4 git commands to generate.