[19/30] Changes to nds32
diff mbox series

Message ID 658aededbdcea2a07c5a13b2641b81dafd62b849.1561408899.git.acsawdey@linux.ibm.com
State New
Headers show
Series
  • Rename movmem pattern to cpymem
Related show

Commit Message

Aaron Sawdey June 25, 2019, 8:22 p.m. UTC
From: Aaron Sawdey <acsawdey@linux.ibm.com>

	* config/nds32/nds32-memory-manipulation.c
	(nds32_expand_movmemsi_loop_unknown_size,
	nds32_expand_movmemsi_loop_known_size, nds32_expand_movmemsi_loop,
	nds32_expand_movmemsi_unroll,
	nds32_expand_movmemsi): Change movmem to cpymem.
	* config/nds32/nds32-multiple.md (movmemsi): Change name to cpymemsi.
	* config/nds32/nds32-protos.h: Change movmem to cpymem.
---
 gcc/config/nds32/nds32-memory-manipulation.c | 30 ++++++++++++++--------------
 gcc/config/nds32/nds32-multiple.md           |  4 ++--
 gcc/config/nds32/nds32-protos.h              |  2 +-
 3 files changed, 18 insertions(+), 18 deletions(-)

Patch
diff mbox series

diff --git a/gcc/config/nds32/nds32-memory-manipulation.c b/gcc/config/nds32/nds32-memory-manipulation.c
index 71b75dc..b3f2cd6 100644
--- a/gcc/config/nds32/nds32-memory-manipulation.c
+++ b/gcc/config/nds32/nds32-memory-manipulation.c
@@ -1,4 +1,4 @@ 
-/* Auxiliary functions for expand movmem, setmem, cmpmem, load_multiple
+/* Auxiliary functions for expand cpymem, setmem, cmpmem, load_multiple
    and store_multiple pattern of Andes NDS32 cpu for GNU compiler
    Copyright (C) 2012-2019 Free Software Foundation, Inc.
    Contributed by Andes Technology Corporation.
@@ -120,14 +120,14 @@  nds32_emit_mem_move_block (int base_regno, int count,
 
 /* ------------------------------------------------------------------------ */
 
-/* Auxiliary function for expand movmem pattern.  */
+/* Auxiliary function for expand cpymem pattern.  */
 
 static bool
-nds32_expand_movmemsi_loop_unknown_size (rtx dstmem, rtx srcmem,
+nds32_expand_cpymemsi_loop_unknown_size (rtx dstmem, rtx srcmem,
 					 rtx size,
 					 rtx alignment)
 {
-  /* Emit loop version of movmem.
+  /* Emit loop version of cpymem.
 
        andi    $size_least_3_bit, $size, #~7
        add     $dst_end, $dst, $size
@@ -254,7 +254,7 @@  nds32_expand_movmemsi_loop_unknown_size (rtx dstmem, rtx srcmem,
 }
 
 static bool
-nds32_expand_movmemsi_loop_known_size (rtx dstmem, rtx srcmem,
+nds32_expand_cpymemsi_loop_known_size (rtx dstmem, rtx srcmem,
 				       rtx size, rtx alignment)
 {
   rtx dst_base_reg, src_base_reg;
@@ -288,7 +288,7 @@  nds32_expand_movmemsi_loop_known_size (rtx dstmem, rtx srcmem,
 
   if (total_bytes < 8)
     {
-      /* Emit total_bytes less than 8 loop version of movmem.
+      /* Emit total_bytes less than 8 loop version of cpymem.
 	add     $dst_end, $dst, $size
 	move    $dst_itr, $dst
 	.Lbyte_mode_loop:
@@ -321,7 +321,7 @@  nds32_expand_movmemsi_loop_known_size (rtx dstmem, rtx srcmem,
     }
   else if (total_bytes % 8 == 0)
     {
-      /* Emit multiple of 8 loop version of movmem.
+      /* Emit multiple of 8 loop version of cpymem.
 
 	 add     $dst_end, $dst, $size
 	 move    $dst_itr, $dst
@@ -370,7 +370,7 @@  nds32_expand_movmemsi_loop_known_size (rtx dstmem, rtx srcmem,
   else
     {
       /* Handle size greater than 8, and not a multiple of 8.  */
-      return nds32_expand_movmemsi_loop_unknown_size (dstmem, srcmem,
+      return nds32_expand_cpymemsi_loop_unknown_size (dstmem, srcmem,
 						      size, alignment);
     }
 
@@ -378,19 +378,19 @@  nds32_expand_movmemsi_loop_known_size (rtx dstmem, rtx srcmem,
 }
 
 static bool
-nds32_expand_movmemsi_loop (rtx dstmem, rtx srcmem,
+nds32_expand_cpymemsi_loop (rtx dstmem, rtx srcmem,
 			    rtx size, rtx alignment)
 {
   if (CONST_INT_P (size))
-    return nds32_expand_movmemsi_loop_known_size (dstmem, srcmem,
+    return nds32_expand_cpymemsi_loop_known_size (dstmem, srcmem,
 						  size, alignment);
   else
-    return nds32_expand_movmemsi_loop_unknown_size (dstmem, srcmem,
+    return nds32_expand_cpymemsi_loop_unknown_size (dstmem, srcmem,
 						    size, alignment);
 }
 
 static bool
-nds32_expand_movmemsi_unroll (rtx dstmem, rtx srcmem,
+nds32_expand_cpymemsi_unroll (rtx dstmem, rtx srcmem,
 			      rtx total_bytes, rtx alignment)
 {
   rtx dst_base_reg, src_base_reg;
@@ -533,13 +533,13 @@  nds32_expand_movmemsi_unroll (rtx dstmem, rtx srcmem,
    This is auxiliary extern function to help create rtx template.
    Check nds32-multiple.md file for the patterns.  */
 bool
-nds32_expand_movmemsi (rtx dstmem, rtx srcmem, rtx total_bytes, rtx alignment)
+nds32_expand_cpymemsi (rtx dstmem, rtx srcmem, rtx total_bytes, rtx alignment)
 {
-  if (nds32_expand_movmemsi_unroll (dstmem, srcmem, total_bytes, alignment))
+  if (nds32_expand_cpymemsi_unroll (dstmem, srcmem, total_bytes, alignment))
     return true;
 
   if (!optimize_size && optimize > 2)
-    return nds32_expand_movmemsi_loop (dstmem, srcmem, total_bytes, alignment);
+    return nds32_expand_cpymemsi_loop (dstmem, srcmem, total_bytes, alignment);
 
   return false;
 }
diff --git a/gcc/config/nds32/nds32-multiple.md b/gcc/config/nds32/nds32-multiple.md
index a1e10c0..98d9508 100644
--- a/gcc/config/nds32/nds32-multiple.md
+++ b/gcc/config/nds32/nds32-multiple.md
@@ -3751,14 +3751,14 @@ 
 ;; operands[3] is the known shared alignment.
 
 
-(define_expand "movmemsi"
+(define_expand "cpymemsi"
   [(match_operand:BLK 0 "general_operand" "")
    (match_operand:BLK 1 "general_operand" "")
    (match_operand:SI 2 "nds32_reg_constant_operand" "")
    (match_operand:SI 3 "const_int_operand" "")]
   ""
 {
-  if (nds32_expand_movmemsi (operands[0],
+  if (nds32_expand_cpymemsi (operands[0],
 			     operands[1],
 			     operands[2],
 			     operands[3]))
diff --git a/gcc/config/nds32/nds32-protos.h b/gcc/config/nds32/nds32-protos.h
index aaa65d6..7ae1954 100644
--- a/gcc/config/nds32/nds32-protos.h
+++ b/gcc/config/nds32/nds32-protos.h
@@ -78,7 +78,7 @@  extern rtx nds32_di_low_part_subreg(rtx);
 
 extern rtx nds32_expand_load_multiple (int, int, rtx, rtx, bool, rtx *);
 extern rtx nds32_expand_store_multiple (int, int, rtx, rtx, bool, rtx *);
-extern bool nds32_expand_movmemsi (rtx, rtx, rtx, rtx);
+extern bool nds32_expand_cpymemsi (rtx, rtx, rtx, rtx);
 extern bool nds32_expand_setmem (rtx, rtx, rtx, rtx, rtx, rtx);
 extern bool nds32_expand_strlen (rtx, rtx, rtx, rtx);