[PATCH 07/30] Changes to bfin
acsawdey@linux.ibm.com
acsawdey@linux.ibm.com
Tue Jun 25 20:25:00 GMT 2019
From: Aaron Sawdey <acsawdey@linux.ibm.com>
* config/bfin/bfin-protos.h: Change movmem to cpymem.
* config/bfin/bfin.c (single_move_for_movmem, bfin_expand_movmem):
Change movmem to cpymem.
* config/bfin/bfin.h: Change movmem to cpymem in comment.
* config/bfin/bfin.md (movmemsi): Change name to cpymemsi.
---
gcc/config/bfin/bfin-protos.h | 2 +-
gcc/config/bfin/bfin.c | 12 ++++++------
gcc/config/bfin/bfin.h | 2 +-
gcc/config/bfin/bfin.md | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/gcc/config/bfin/bfin-protos.h b/gcc/config/bfin/bfin-protos.h
index 64a1842..7d0f705 100644
--- a/gcc/config/bfin/bfin-protos.h
+++ b/gcc/config/bfin/bfin-protos.h
@@ -81,7 +81,7 @@ extern bool expand_move (rtx *, machine_mode);
extern void bfin_expand_call (rtx, rtx, rtx, rtx, int);
extern bool bfin_longcall_p (rtx, int);
extern bool bfin_dsp_memref_p (rtx);
-extern bool bfin_expand_movmem (rtx, rtx, rtx, rtx);
+extern bool bfin_expand_cpymem (rtx, rtx, rtx, rtx);
extern enum reg_class secondary_input_reload_class (enum reg_class,
machine_mode,
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index e520115..319d7e2 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -3208,7 +3208,7 @@ output_pop_multiple (rtx insn, rtx *operands)
/* Adjust DST and SRC by OFFSET bytes, and generate one move in mode MODE. */
static void
-single_move_for_movmem (rtx dst, rtx src, machine_mode mode, HOST_WIDE_INT offset)
+single_move_for_cpymem (rtx dst, rtx src, machine_mode mode, HOST_WIDE_INT offset)
{
rtx scratch = gen_reg_rtx (mode);
rtx srcmem, dstmem;
@@ -3224,7 +3224,7 @@ single_move_for_movmem (rtx dst, rtx src, machine_mode mode, HOST_WIDE_INT offse
back on a different method. */
bool
-bfin_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp)
+bfin_expand_cpymem (rtx dst, rtx src, rtx count_exp, rtx align_exp)
{
rtx srcreg, destreg, countreg;
HOST_WIDE_INT align = 0;
@@ -3269,7 +3269,7 @@ bfin_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp)
{
if ((count & ~3) == 4)
{
- single_move_for_movmem (dst, src, SImode, offset);
+ single_move_for_cpymem (dst, src, SImode, offset);
offset = 4;
}
else if (count & ~3)
@@ -3282,7 +3282,7 @@ bfin_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp)
}
if (count & 2)
{
- single_move_for_movmem (dst, src, HImode, offset);
+ single_move_for_cpymem (dst, src, HImode, offset);
offset += 2;
}
}
@@ -3290,7 +3290,7 @@ bfin_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp)
{
if ((count & ~1) == 2)
{
- single_move_for_movmem (dst, src, HImode, offset);
+ single_move_for_cpymem (dst, src, HImode, offset);
offset = 2;
}
else if (count & ~1)
@@ -3304,7 +3304,7 @@ bfin_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp)
}
if (count & 1)
{
- single_move_for_movmem (dst, src, QImode, offset);
+ single_move_for_cpymem (dst, src, QImode, offset);
}
return true;
}
diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
index 19b7f81..4aba596 100644
--- a/gcc/config/bfin/bfin.h
+++ b/gcc/config/bfin/bfin.h
@@ -793,7 +793,7 @@ typedef struct {
#define MOVE_MAX UNITS_PER_WORD
/* If a memory-to-memory move would take MOVE_RATIO or more simple
- move-instruction pairs, we will do a movmem or libcall instead. */
+ move-instruction pairs, we will do a cpymem or libcall instead. */
#define MOVE_RATIO(speed) 5
diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md
index ac58924..6ac208d 100644
--- a/gcc/config/bfin/bfin.md
+++ b/gcc/config/bfin/bfin.md
@@ -2316,14 +2316,14 @@
(set_attr "length" "16")
(set_attr "seq_insns" "multi")])
-(define_expand "movmemsi"
+(define_expand "cpymemsi"
[(match_operand:BLK 0 "general_operand" "")
(match_operand:BLK 1 "general_operand" "")
(match_operand:SI 2 "const_int_operand" "")
(match_operand:SI 3 "const_int_operand" "")]
""
{
- if (bfin_expand_movmem (operands[0], operands[1], operands[2], operands[3]))
+ if (bfin_expand_cpymem (operands[0], operands[1], operands[2], operands[3]))
DONE;
FAIL;
})
--
2.7.4
More information about the Gcc-patches
mailing list