aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1997-03-21 00:55:35 -0700
committerJeff Law <law@gcc.gnu.org>1997-03-21 00:55:35 -0700
commit90304f64f2e2d5eb9f64e3a4d2a5cc674374a3a7 (patch)
treeb181cba991c0df4e9164d56001831c9e05d1fe6a /gcc
parent3b800f71d378c8bfc24cc96160bab8af7a35e676 (diff)
downloadgcc-90304f64f2e2d5eb9f64e3a4d2a5cc674374a3a7.zip
gcc-90304f64f2e2d5eb9f64e3a4d2a5cc674374a3a7.tar.gz
gcc-90304f64f2e2d5eb9f64e3a4d2a5cc674374a3a7.tar.bz2
* pa/pa.c (compute_movstrsi_length): Handle residuals correctly.
From-SVN: r13756
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/pa/pa.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 5f94160..95b6c00 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. */