From 55af478400524cba7994e353fd9a98ef1543df2f Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Fri, 9 Dec 2016 22:27:00 +0000 Subject: MIPS16/opcodes: Reformat raw EXTEND and undecoded output Use a tab rather than a space to separate `extend' and its uninterpreted argument output, like with regular instructions. Separate hexadecimal halves of undecoded extended instructions output with a space instead of presenting them concatenated. opcodes/ * mips-dis.c (print_insn_mips16): Use a tab rather than a space to separate `extend' and its uninterpreted argument output. Separate hexadecimal halves of undecoded extended instructions output. binutils/ * testsuite/binutils-all/mips/mips16-extend-noinsn.d: New test. * testsuite/binutils-all/mips/mips16-extend-noinsn.s: New test source. * testsuite/binutils-all/mips/mips.exp: Run the new test. --- opcodes/ChangeLog | 7 +++++++ opcodes/mips-dis.c | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'opcodes') diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 1e5ca72..0d0e186 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,10 @@ +2016-12-09 Maciej W. Rozycki + + * mips-dis.c (print_insn_mips16): Use a tab rather than a space + to separate `extend' and its uninterpreted argument output. + Separate hexadecimal halves of undecoded extended instructions + output. + 2016-12-08 Maciej W. Rozycki * mips-dis.c (print_mips16_insn_arg): Remove extraneous diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c index c23e369..b3daacd 100644 --- a/opcodes/mips-dis.c +++ b/opcodes/mips-dis.c @@ -2042,7 +2042,7 @@ print_insn_mips16 (bfd_vma memaddr, struct disassemble_info *info) status = (*info->read_memory_func) (memaddr, buffer, 2, info); if (status != 0) { - infprintf (is, "extend 0x%x", (unsigned int) extend); + infprintf (is, "extend\t0x%x", (unsigned int) extend); (*info->memory_error_func) (status, memaddr, info); return -1; } @@ -2055,7 +2055,7 @@ print_insn_mips16 (bfd_vma memaddr, struct disassemble_info *info) /* Check for an extend opcode followed by an extend opcode. */ if ((insn & 0xf800) == 0xf000) { - infprintf (is, "extend 0x%x", (unsigned int) extend); + infprintf (is, "extend\t0x%x", (unsigned int) extend); info->insn_type = dis_noninsn; return length; } @@ -2078,7 +2078,7 @@ print_insn_mips16 (bfd_vma memaddr, struct disassemble_info *info) { if (use_extend) { - infprintf (is, "extend 0x%x", (unsigned int) extend); + infprintf (is, "extend\t0x%x", (unsigned int) extend); info->insn_type = dis_noninsn; return length - 2; } @@ -2147,7 +2147,7 @@ print_insn_mips16 (bfd_vma memaddr, struct disassemble_info *info) #undef GET_OP if (use_extend) - infprintf (is, "0x%x", extend | 0xf000); + infprintf (is, "0x%x ", extend | 0xf000); infprintf (is, "0x%x", insn); info->insn_type = dis_noninsn; -- cgit v1.1