+2012-08-06 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * config/tc-mips.c (append_insn): Also handle moving delay-slot
+ instruction across frags for fixed branches.
+
2012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
* frags.c (frag_grow): Never shrink the obstack size requested
move_insn (ip, delay.frag, delay.where);
move_insn (&delay, ip->frag, ip->where + insn_length (ip));
}
- else if (relaxed_branch)
+ else if (relaxed_branch || delay.frag != ip->frag)
{
/* Add the delay slot instruction to the end of the
current frag and shrink the fixed part of the
+2012-08-06 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * gas/mips/branch-swap-2.l: New list test.
+ * gas/mips/branch-swap-2.s: New test source.
+ * gas/mips/mips.exp: Run the new test.
+
2012-08-06 Roland McGrath <mcgrathr@google.com>
* gas/i386/x86-64-stack.s: Add cases for push immediate.
--- /dev/null
+# No warnings or errors expected!
--- /dev/null
+ .set micromips
+ .text
+foo:
+ .rept count
+ ori $2, $3, (. - foo) >> 2
+ .endr
+ addu $2, $3, $4
+ j ext
run_dump_test_arches "branch-misc-2pic-64" [mips_arch_list_matching mips3]
run_dump_test "branch-misc-3"
run_dump_test "branch-swap"
+
+ if $elf {
+ # Sweep a range of branch offsets so that it hits a position where
+ # it is at the beginning of a frag and then swapped with a 16-bit
+ # instruction from the preceding frag. The offset will be somewhere
+ # close below 4096 as this is the default obstack size limit that
+ # we use and some space will have been already consumed. The exact
+ # amount depends on the host's programming model.
+ for { set count 960 } { $count <= 1024 } { incr count } {
+ run_list_test "branch-swap-2" "--defsym count=$count" \
+ "MIPS branch swapping ($count)"
+ }
+ }
+
run_dump_test "div"
if { !$addr32 } {