--- /dev/null
+#PROG: objcopy
+#objdump: -d --prefix-addresses --show-raw-insn
+#name: microMIPS source file contains reserved encoding (n32)
+#source: micromips-reserved-enc.s
+#dump: micromips-reserved-enc-o32.d
--- /dev/null
+#PROG: objcopy
+#objdump: -d --prefix-addresses --show-raw-insn
+#name: microMIPS source file contains reserved encoding (n64)
+#source: micromips-reserved-enc.s
+#dump: micromips-reserved-enc-o32.d
--- /dev/null
+#PROG: objcopy
+#objdump: -d --prefix-addresses --show-raw-insn
+#name: microMIPS source file contains reserved encoding (o32)
+#source: micromips-reserved-enc.s
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> 7f6e 5d4c \.short 0x7f6e, 0x5d4c
+ \.\.\.
run_dump_test_o32 "global-local-symtab-final-o32" useld
run_dump_test_n32 "global-local-symtab-final-n32" useld
run_dump_test_n64 "global-local-symtab-final-n64" useld
+
+run_dump_test_o32 "micromips-reserved-enc-o32"
+run_dump_test_n32 "micromips-reserved-enc-n32"
+run_dump_test_n64 "micromips-reserved-enc-n64"
}
}
- 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;