--- /dev/null
+#as: -mno-arch-attr
+#source: dis-data.s
+#objdump: -D
+
+.*:[ ]+file format .*
+
+
+Disassembly of section .text.byte:
+
+0+000 <.text.byte>:
+[ ]+0:[ ]+7f[ ]+.byte[ ]+0x7f
+
+Disassembly of section .text.short:
+
+0+000 <.text.short>:
+[ ]+0:[ ]+ef7f[ ]+.short[ ]+0xef7f
+
+Disassembly of section .text.3byte:
+
+0+000 <.text.3byte>:
+[ ]+0:[ ]+03ef7f[ ]+.3byte[ ]+0x03ef7f
+
+Disassembly of section .text.word:
+
+0+000 <.text.word>:
+[ ]+0:[ ]+0403ef7f[ ]+.word[ ]+0x0403ef7f
+
+Disassembly of section .text.5byte:
+
+0+000 <.text.5byte>:
+[ ]+0:[ ]+050403ef7f[ ]+.5byte[ ]+0x050403ef7f
+
+Disassembly of section .text.6byte:
+
+0+000 <.text.6byte>:
+[ ]+0:[ ]+06050403ef7f[ ]+.6byte[ ]+0x06050403ef7f
+
+Disassembly of section .text.7byte:
+
+0+000 <.text.7byte>:
+[ ]+0:[ ]+0706050403ef7f[ ]+.7byte[ ]+0x0706050403ef7f
+
+Disassembly of section .text.dword:
+
+0+000 <.text.dword>:
+[ ]+0:[ ]+080706050403ef7f[ ]+.dword[ ]+0x080706050403ef7f
+
+Disassembly of section .text.9byte:
+
+0+000 <.text.9byte>:
+[ ]+0:[ ]+09080706050403ef7f[ ]+.9byte[ ]+0x09080706050403ef7f
+
+Disassembly of section .text.10byte:
+
+0+000 <.text.10byte>:
+[ ]+0:[ ]+0a09080706050403ef7f[ ]+.10byte[ ]+0x0a09080706050403ef7f
+
+Disassembly of section .text.11byte:
+
+0+000 <.text.11byte>:
+[ ]+0:[ ]+0b0a09080706050403ef7f[ ]+.11byte[ ]+0x0b0a09080706050403ef7f
+
+Disassembly of section .text.12byte:
+
+0+000 <.text.12byte>:
+[ ]+0:[ ]+0c0b0a09080706050403ef7f[ ]+.12byte[ ]+0x0c0b0a09080706050403ef7f
+
+Disassembly of section .text.13byte:
+
+0+000 <.text.13byte>:
+[ ]+0:[ ]+0d0c0b0a09080706050403ef7f[ ]+.13byte[ ]+0x0d0c0b0a09080706050403ef7f
+
+Disassembly of section .text.14byte:
+
+0+000 <.text.14byte>:
+[ ]+0:[ ]+0e0d0c0b0a09080706050403ef7f[ ]+.14byte[ ]+0x0e0d0c0b0a09080706050403ef7f
+
+Disassembly of section .text.15byte:
+
+0+000 <.text.15byte>:
+[ ]+0:[ ]+0f0e0d0c0b0a09080706050403ef7f[ ]+.15byte[ ]+0x0f0e0d0c0b0a09080706050403ef7f
+
+Disassembly of section .text.16byte:
+
+0+000 <.text.16byte>:
+[ ]+0:[ ]+100f0e0d0c0b0a09080706050403ef7f[ ]+.16byte[ ]+0x100f0e0d0c0b0a09080706050403ef7f
+
+Disassembly of section .text.17byte:
+
+0+000 <.text.17byte>:
+[ ]+0:[ ]+11100f0e0d0c0b0a09080706050403ef7f[ ]+.17byte[ ]+0x11100f0e0d0c0b0a09080706050403ef7f
+
+Disassembly of section .text.18byte:
+
+0+000 <.text.18byte>:
+[ ]+0:[ ]+1211100f0e0d0c0b0a09080706050403ef7f[ ]+.18byte[ ]+0x1211100f0e0d0c0b0a09080706050403ef7f
+
+Disassembly of section .text.19byte:
+
+0+000 <.text.19byte>:
+[ ]+0:[ ]+131211100f0e0d0c0b0a09080706050403ef7f[ ]+.19byte[ ]+0x131211100f0e0d0c0b0a09080706050403ef7f
+
+Disassembly of section .text.20byte:
+
+0+000 <.text.20byte>:
+[ ]+0:[ ]+14131211100f0e0d0c0b0a09080706050403ef7f[ ]+.20byte[ ]+0x14131211100f0e0d0c0b0a09080706050403ef7f
+
+Disassembly of section .text.21byte:
+
+0+000 <.text.21byte>:
+[ ]+0:[ ]+1514131211100f0e0d0c0b0a09080706050403ef7f[ ]+.21byte[ ]+0x1514131211100f0e0d0c0b0a09080706050403ef7f
+
+Disassembly of section .text.22byte:
+
+0+000 <.text.22byte>:
+[ ]+0:[ ]+ef7f 0403 0605 0807[ ]+.insn[ ]+22, 0x161514131211100f0e0d0c0b0a09080706050403ef7f
+[ ]+8:[ ]+0a09 0c0b 0e0d 100f ?
+[ ]+10:[ ]+1211 1413 1615 ?
+
+Disassembly of section .text.23byte:
+
+0+000 <.text.23byte>:
+[ ]+0:[ ]+ef7f 0403 0605 0807[ ]+.insn[ ]+22, 0x161514131211100f0e0d0c0b0a09080706050403ef7f
+[ ]+8:[ ]+0a09 0c0b 0e0d 100f ?
+[ ]+10:[ ]+1211 1413 1615 ?
+[ ]+16:[ ]+17[ ]+.byte[ ]+0x17
+
+Disassembly of section .text.24byte:
+
+0+000 <.text.24byte>:
+[ ]+0:[ ]+ef7f 0403 0605 0807[ ]+.insn[ ]+22, 0x161514131211100f0e0d0c0b0a09080706050403ef7f
+[ ]+8:[ ]+0a09 0c0b 0e0d 100f ?
+[ ]+10:[ ]+1211 1413 1615 ?
+[ ]+16:[ ]+1817[ ]+.short[ ]+0x1817
--- /dev/null
+.section .text.byte, "ax"
+.byte 0x7f
+.section .text.short, "ax"
+.byte 0x7f,0xef
+.section .text.3byte, "ax"
+.byte 0x7f,0xef,3
+.section .text.word, "ax"
+.byte 0x7f,0xef,3,4
+.section .text.5byte, "ax"
+.byte 0x7f,0xef,3,4,5
+.section .text.6byte, "ax"
+.byte 0x7f,0xef,3,4,5,6
+.section .text.7byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7
+.section .text.dword, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8
+.section .text.9byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9
+.section .text.10byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10
+.section .text.11byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11
+.section .text.12byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12
+.section .text.13byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12,13
+.section .text.14byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12,13,14
+.section .text.15byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12,13,14,15
+.section .text.16byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12,13,14,15,16
+.section .text.17byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
+.section .text.18byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
+.section .text.19byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
+.section .text.20byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
+.section .text.21byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21
+.section .text.22byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22
+.section .text.23byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23
+.section .text.24byte, "ax"
+.byte 0x7f,0xef,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24
disassemble_info *info)
{
info->display_endian = info->endian;
+ int i;
switch (info->bytes_per_chunk)
{
(*info->fprintf_styled_func)
(info->stream, dis_style_immediate, "0x%04x", (unsigned) data);
break;
- case 3:
- info->bytes_per_line = 7;
- (*info->fprintf_styled_func)
- (info->stream, dis_style_assembler_directive, ".word");
- (*info->fprintf_styled_func) (info->stream, dis_style_text, "\t");
- (*info->fprintf_styled_func)
- (info->stream, dis_style_immediate, "0x%06x", (unsigned) data);
- break;
case 4:
info->bytes_per_line = 8;
(*info->fprintf_styled_func)
(unsigned long long) data);
break;
default:
- abort ();
+ /* Arbitrary data so just print the bits in the shape of an .<N>byte
+ directive. */
+ info->bytes_per_line = info->bytes_per_chunk;
+ (*info->fprintf_styled_func)
+ (info->stream, dis_style_assembler_directive, ".%dbyte", info->bytes_per_chunk);
+ (*info->fprintf_styled_func) (info->stream, dis_style_text, "\t");
+ (*info->fprintf_styled_func) (info->stream, dis_style_immediate, "0x");
+ for (i = info->bytes_per_line; i > 0;)
+ {
+ i--;
+ data = bfd_get_bits (packet + i, 8, false);
+ (*info->fprintf_styled_func)
+ (info->stream, dis_style_immediate, "%02x",
+ (unsigned) data);
+ }
+ break;
}
return info->bytes_per_chunk;
}