aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hayes <m.hayes@elec.canterbury.ac.nz>1999-10-16 00:39:15 +0000
committerMichael Hayes <m.hayes@gcc.gnu.org>1999-10-16 00:39:15 +0000
commit0dced2c729c164873a10bccdbfff8d5dc6d2a820 (patch)
treed384207cd42a3eb0517e0d0dd456350c28b2a8aa
parent37641f7dbd9523e44bf2647a45659edc64b8d8b2 (diff)
downloadgcc-0dced2c729c164873a10bccdbfff8d5dc6d2a820.zip
gcc-0dced2c729c164873a10bccdbfff8d5dc6d2a820.tar.gz
gcc-0dced2c729c164873a10bccdbfff8d5dc6d2a820.tar.bz2
c4x.md (movstrqi_small): Utilise parallel move instructions.
* config/c4x/c4x.md (movstrqi_small): Utilise parallel move instructions. From-SVN: r30033
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/c4x/c4x.md31
2 files changed, 27 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3f7f0d1..3b4c118 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Sat Oct 16 13:37:46 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
+
+ * config/c4x/c4x.md (movstrqi_small): Utilise parallel move
+ instructions.
+
Sat Oct 16 13:26:47 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* config/c4x/c4x.md (*db_noclobber,
diff --git a/gcc/config/c4x/c4x.md b/gcc/config/c4x/c4x.md
index 3b40c37..7ef0d32 100644
--- a/gcc/config/c4x/c4x.md
+++ b/gcc/config/c4x/c4x.md
@@ -5338,16 +5338,29 @@
src_mem = gen_rtx_MEM (QImode, src);
dst_mem = gen_rtx_MEM (QImode, dst);
- emit_insn (gen_movqi (tmp, src_mem));
- emit_insn (gen_addqi3_noclobber (src, src, const1_rtx));
- for (i = 1; i < len; i++)
+ if (TARGET_PARALLEL)
{
- emit_insn (gen_movqi_parallel (tmp, src_mem, dst_mem, tmp));
- emit_insn (gen_addqi3_noclobber (src, src, const1_rtx));
- emit_insn (gen_addqi3_noclobber (dst, dst, const1_rtx));
+ emit_insn (gen_movqi (tmp, src_mem));
+ emit_insn (gen_addqi3_noclobber (src, src, const1_rtx));
+ for (i = 1; i < len; i++)
+ {
+ emit_insn (gen_movqi_parallel (tmp, src_mem, dst_mem, tmp));
+ emit_insn (gen_addqi3_noclobber (src, src, const1_rtx));
+ emit_insn (gen_addqi3_noclobber (dst, dst, const1_rtx));
+ }
+ emit_insn (gen_movqi (dst_mem, tmp));
+ emit_insn (gen_addqi3_noclobber (dst, dst, const1_rtx));
+ }
+ else
+ {
+ for (i = 0; i < len; i++)
+ {
+ emit_insn (gen_movqi (tmp, src_mem));
+ emit_insn (gen_movqi (dst_mem, tmp));
+ emit_insn (gen_addqi3_noclobber (src, src, const1_rtx));
+ emit_insn (gen_addqi3_noclobber (dst, dst, const1_rtx));
+ }
}
- emit_insn (gen_movqi (dst_mem, tmp));
- emit_insn (gen_addqi3_noclobber (dst, dst, const1_rtx));
DONE;
}
")
@@ -5450,7 +5463,7 @@
operands[1] = copy_to_mode_reg (Pmode, XEXP (operands[1], 0));
tmp = gen_reg_rtx (QImode);
if (INTVAL (operands[2]) < 8)
- emit_insn (gen_movstrqi_small (operands[0], operands[1], operands[2],
+ emit_insn (gen_movstrqi_small2 (operands[0], operands[1], operands[2],
operands[3], tmp));
else
{