summaryrefslogtreecommitdiff
path: root/opcodes/mips-dis.c
diff options
context:
space:
mode:
Diffstat (limited to 'opcodes/mips-dis.c')
-rw-r--r--opcodes/mips-dis.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index 6a513cd8946..859d4e3806f 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -2600,12 +2600,15 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
}
}
- if (length == 2)
- infprintf (is, dis_style_assembler_directive, ".short");
- else
- infprintf (is, dis_style_assembler_directive, ".word");
+ infprintf (is, dis_style_assembler_directive, ".short");
infprintf (is, dis_style_text, "\t");
- infprintf (is, dis_style_immediate, "0x%x", insn);
+ if (length != 2)
+ {
+ infprintf (is, dis_style_immediate, "0x%x", (insn >> 16) & 0xffff);
+ infprintf (is, dis_style_text, ", ");
+ }
+ infprintf (is, dis_style_immediate, "0x%x", (insn & 0xffff));
+
info->insn_type = dis_noninsn;
return length;