From 90304f64f2e2d5eb9f64e3a4d2a5cc674374a3a7 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 21 Mar 1997 00:55:35 -0700 Subject: [PATCH] * pa/pa.c (compute_movstrsi_length): Handle residuals correctly. From-SVN: r13756 --- gcc/config/pa/pa.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 5f9416057df..95b6c00dc81 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -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; - - /* 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 % (2 * align)) >= align) + n_insns += 2; + + if ((n_bytes % align) != 0) + n_insns += 2; } /* Lengths are expressed in bytes now; each insn is 4 bytes. */ -- 2.30.2