From 79bfe6ae6bade5eea8dd3a4db8b0f104b00c84b5 Mon Sep 17 00:00:00 2001 From: law Date: Fri, 21 Mar 1997 07:55:35 +0000 Subject: [PATCH] * pa/pa.c (compute_movstrsi_length): Handle residuals correctly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13756 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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.11.4.GIT