* pa/pa.c (compute_movstrsi_length): Handle residuals correctly.

From-SVN: r13756
This commit is contained in:
Jeff Law 1997-03-21 00:55:35 -07:00
parent 3b800f71d3
commit 90304f64f2

View File

@ -1944,20 +1944,17 @@ compute_movstrsi_length (insn)
if (align > 4)
align = 4;
/* The basic opying loop. */
/* The basic copying loop. */
n_insns = 6;
/* Residuals. */
if (n_bytes % (2 * align) != 0)
{
/* Any residual caused by unrolling the copy loop. */
if (n_bytes % (2 * align) > align)
n_insns += 1;
if ((n_bytes % (2 * align)) >= align)
n_insns += 2;
/* Any residual because the number of bytes was not a
multiple of the alignment. */
if (n_bytes % align != 0)
n_insns += 1;
if ((n_bytes % align) != 0)
n_insns += 2;
}
/* Lengths are expressed in bytes now; each insn is 4 bytes. */