aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2005-11-11 17:58:31 +0000
committerJie Zhang <jiez@gcc.gnu.org>2005-11-11 17:58:31 +0000
commit51a641fdb2ae830bce646ad72ab9919a269fb9d3 (patch)
treef972ce37060ef73ff75360d3018bddbb42111196
parent47b266bdfe8929e17037c7672ed6a30aac50d37e (diff)
downloadgcc-51a641fdb2ae830bce646ad72ab9919a269fb9d3.zip
gcc-51a641fdb2ae830bce646ad72ab9919a269fb9d3.tar.gz
gcc-51a641fdb2ae830bce646ad72ab9919a269fb9d3.tar.bz2
bfin.c (bfin_expand_strmov): Correctly move the trailing bytes when align is 2.
* config/bfin/bfin.c (bfin_expand_strmov): Correctly move the trailing bytes when align is 2. * config/bfin/bfin.md (rep_movsi, rep_movhi): Make LSETUP be followed by the first instruction of the loop. From-SVN: r106790
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/bfin/bfin.c10
-rw-r--r--gcc/config/bfin/bfin.md4
3 files changed, 14 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7a871c4..425bc1a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2005-11-11 Jie Zhang <jie.zhang@analog.com>
+
+ * config/bfin/bfin.c (bfin_expand_strmov): Correctly move the trailing
+ bytes when align is 2.
+ * config/bfin/bfin.md (rep_movsi, rep_movhi): Make LSETUP be followed
+ by the first instruction of the loop.
+
2005-11-11 Jason Merrill <jason@redhat.com>
PR c++/24686
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index be028f7..f1a8268 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -2475,6 +2475,11 @@ bfin_expand_strmov (rtx dst, rtx src, rtx count_exp, rtx align_exp)
emit_insn (gen_rep_movsi (destreg, srcreg, countreg, destreg, srcreg));
}
+ if (count & 2)
+ {
+ single_move_for_strmov (dst, src, HImode, offset);
+ offset += 2;
+ }
}
else
{
@@ -2491,11 +2496,6 @@ bfin_expand_strmov (rtx dst, rtx src, rtx count_exp, rtx align_exp)
emit_insn (gen_rep_movhi (destreg, srcreg, countreg, destreg, srcreg));
}
}
- if (count & 2)
- {
- single_move_for_strmov (dst, src, HImode, offset);
- offset += 2;
- }
if (count & 1)
{
single_move_for_strmov (dst, src, QImode, offset);
diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md
index 1bbbacd..363a1e9 100644
--- a/gcc/config/bfin/bfin.md
+++ b/gcc/config/bfin/bfin.md
@@ -1458,7 +1458,7 @@
(use (match_dup 2))
(clobber (match_scratch:HI 5 "=&d"))]
""
- "lsetup (1f, 1f) LC1 = %2; %5 = [%4++]; 1: MNOP || [%3++] = %5 || %5 = [%4++]; [%3++] = %5;"
+ "%5 = [%4++]; lsetup (1f, 1f) LC1 = %2; 1: MNOP || [%3++] = %5 || %5 = [%4++]; [%3++] = %5;"
[(set_attr "type" "misc")
(set_attr "length" "16")])
@@ -1477,7 +1477,7 @@
(use (match_dup 2))
(clobber (match_scratch:HI 5 "=&d"))]
""
- "lsetup (1f, 1f) LC1 = %2; %h5 = W[%4++]; 1: MNOP || W [%3++] = %5 || %h5 = W [%4++]; W [%3++] = %5;"
+ "%h5 = W[%4++]; lsetup (1f, 1f) LC1 = %2; 1: MNOP || W [%3++] = %5 || %h5 = W [%4++]; W [%3++] = %5;"
[(set_attr "type" "misc")
(set_attr "length" "16")])