c4x.md (movstrqi_small): Utilise parallel move instructions.
authorMichael Hayes <m.hayes@elec.canterbury.ac.nz>
Sat, 16 Oct 1999 00:39:15 +0000 (00:39 +0000)
committerMichael Hayes <m.hayes@gcc.gnu.org>
Sat, 16 Oct 1999 00:39:15 +0000 (00:39 +0000)
* config/c4x/c4x.md (movstrqi_small): Utilise parallel move
instructions.

From-SVN: r30033

gcc/ChangeLog
gcc/config/c4x/c4x.md

index 3f7f0d1c89a27311eaee64abc20337591611547e..3b4c118fcd996d87ca8cebbb654547fa64300668 100644 (file)
@@ -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, 
index 3b40c370c764e00ac15dc15c82323b91bede83d5..7ef0d3217f242919258bc4b394ccf9ae30128ab2 100644 (file)
     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;
   }
   ")
    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
      {