+2012-11-01 Chao-ying Fu <fu@mips.com>
+
+ * config/tc-mips.c (append_insn): Set fx_no_overflow for 16-bit
+ microMIPS branch relocations.
+
2012-11-01 Maciej W. Rozycki <macro@codesourcery.com>
* config/tc-mips.c (is_delay_slot_valid): Don't accept macros
|| lo16_reloc_p (reloc_type[0])))
ip->fixp[0]->fx_no_overflow = 1;
+ /* These relocations can have an addend that won't fit in 2 octets. */
+ if (reloc_type[0] == BFD_RELOC_MICROMIPS_7_PCREL_S1
+ || reloc_type[0] == BFD_RELOC_MICROMIPS_10_PCREL_S1)
+ ip->fixp[0]->fx_no_overflow = 1;
+
if (mips_relax.sequence)
{
if (mips_relax.first_fixup == 0)
+2012-11-01 Chao-ying Fu <fu@mips.com>
+
+ * gas/mips/micromips-b16.d: New test.
+ * gas/mips/micromips-b16.s: New test source.
+ * gas/mips/mips.exp: Run the new test.
+
2012-11-01 Chao-ying Fu <fu@mips.com>
Maciej W. Rozycki <macro@codesourcery.com>
--- /dev/null
+#objdump: -dr --show-raw-insn
+#name: microMIPS b16, bnez16, beqz16
+#as: -32 -mmicromips
+#source: micromips-b16.s
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+
+[0-9a-f]+ <test1>:
+ \.\.\.
+
+[0-9a-f]+ <test2>:
+[ 0-9a-f]+: cfff b [0-9a-f]+ <.*>
+[ ]*[0-9a-f]+: R_MICROMIPS_PC10_S1 .*
+[ 0-9a-f]+: 0c00 nop
+
+[0-9a-f]+ <.*>:
+[ 0-9a-f]+: ad7f bnez v0,[0-9a-f]+ <.*>
+[ ]*[0-9a-f]+: R_MICROMIPS_PC7_S1 .*
+[ 0-9a-f]+: 0c00 nop
+
+[0-9a-f]+ <.*>:
+[ 0-9a-f]+: 8d7f beqz v0,[0-9a-f]+ <.*>
+[ ]*[0-9a-f]+: R_MICROMIPS_PC7_S1 .*
+[ 0-9a-f]+: 0c00 nop
+
+[0-9a-f]+ <.*>:
+[ 0-9a-f]+: cfff b [0-9a-f]+ <.*>
+[ ]*[0-9a-f]+: R_MICROMIPS_PC10_S1 .*
+[ 0-9a-f]+: 0c00 nop
+
+[0-9a-f]+ <.*>:
+[ 0-9a-f]+: ad7f bnez v0,[0-9a-f]+ <.*>
+[ ]*[0-9a-f]+: R_MICROMIPS_PC7_S1 .*
+[ 0-9a-f]+: 0c00 nop
+
+[0-9a-f]+ <.*>:
+[ 0-9a-f]+: 8d7f beqz v0,[0-9a-f]+ <.*>
+[ ]*[0-9a-f]+: R_MICROMIPS_PC7_S1 .*
+[ 0-9a-f]+: 0c00 nop
+
+[0-9a-f]+ <.*>:
+[ 0-9a-f]+: 0c00 nop
+#pass
--- /dev/null
+ .text
+test1:
+ .space 65536
+test2:
+ b16 1f
+1:
+ bnez16 $2,1f
+1:
+ beqz16 $2,1f
+1:
+ b 1f
+1:
+ bnez $2,1f
+1:
+ beqz $2,1f
+1:
+ nop
run_dump_test "micromips-branch-delay"
run_dump_test "micromips-warn-branch-delay"
run_dump_test "micromips-warn-branch-delay-1"
+ run_dump_test "micromips-b16"
}
run_dump_test_arches "mcu" [mips_arch_list_matching mips32r2 \