+2016-12-23 Maciej W. Rozycki <macro@imgtec.com>
+
+ * testsuite/gas/mips/mips16-extend-swap.d: New test.
+ * testsuite/gas/mips/mips16-extend-swap.s: New test source.
+ * testsuite/gas/mips/mips.exp: Run the new test.
+
2016-12-23 Joe Seymour <joe.s@somniumtech.com>
* config/tc-msp430.c (msp430_mcu_data): Sync with data from TI's
run_list_test "mips16e-save-err" "-march=mips32 -32"
run_dump_test "mips16-intermix"
run_dump_test "mips16-extend"
+ run_dump_test "mips16-extend-swap"
run_dump_test "mips16-sprel-swap"
run_dump_test "mips16-sdrasp"
--- /dev/null
+#objdump: -d --prefix-addresses --show-raw-insn
+#name: MIPS16 jump delay slot scheduling for EXTEND instructions
+#as: -32
+
+# Verify that EXTEND instructions are not scheduled into a jump delay slot.
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> f123 extend 0x123
+[0-9a-f]+ <[^>]*> 1800 0000 jal 00000000 <foo>
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> f123 extend 0x123
+[0-9a-f]+ <[^>]*> 1c00 0000 jalx 00000000 <foo>
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> f123 eb00 jr v1
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> f123 e820 jr ra
+[0-9a-f]+ <[^>]*> 6500 nop
+[0-9a-f]+ <[^>]*> f123 eb40 jalr v1
+[0-9a-f]+ <[^>]*> 6500 nop
+ \.\.\.
--- /dev/null
+ .set mips1
+ .set mips16
+foo:
+ extend 0x123
+ jal bar
+
+ extend 0x123
+ jalx baz
+
+ extend 0x123
+ jr $3
+
+ extend 0x123
+ jr $31
+
+ extend 0x123
+ jalr $3
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 4, 0
+ .space 16
+2016-12-23 Maciej W. Rozycki <macro@imgtec.com>
+
+ * mips16-opc.c (mips16_opcodes): Set NODS in `pinfo' for
+ "extend".
+
2016-12-23 Maciej W. Rozycki <macro@imgtec.com>
* mips-dis.c (set_default_mips_dis_options): Use
{"zew", "x", 0xe851, 0xf8ff, MOD_1, 0, I64, 0, 0 },
/* Place EXTEND last so that it catches any prefix that didn't match
anything. */
-{"extend", "e", 0xf000, 0xf800, 0, 0, I1, 0, 0 },
+{"extend", "e", 0xf000, 0xf800, NODS, 0, I1, 0, 0 },
};
const int bfd_mips16_num_opcodes =