That extra alignment causes some branches to go out of range.
2013-11-14 Joern Rennecke <[email protected]>
* config/arc/arc.md (doloop_begin_i): Remove extra alignment;
use (.&-4) idiom.
Index: config/arc/arc.md
===================================================================
--- config/arc/arc.md (revision 204806)
+++ config/arc/arc.md (working copy)
@@ -4789,8 +4789,7 @@ (define_insn "doloop_begin_i"
{
/* ??? Can do better for when a scratch register
is known. But that would require extra testing. */
- arc_clear_unalign ();
- return ".p2align 2\;push_s r0\;add r0,pcl,%4-.+2\;sr r0,[2];
LP_START\;add r0,pcl,.L__GCC__LP%1-.+2\;sr r0,[3]; LP_END\;pop_s r0";
+ return "push_s r0\;add r0,pcl,%4-(.&-4)\;sr r0,[2]; LP_START\;add
r0,pcl,.L__GCC__LP%1-(.&-4)\;sr r0,[3]; LP_END\;pop_s r0";
}
/* Check if the loop end is in range to be set by the lp instruction. */
size = INTVAL (operands[3]) < 2 ? 0 : 2048;