Commit 7cff0471 by Richard Sandiford Committed by Richard Sandiford

target-insns.def (movstr): New pattern.

gcc/
	* target-insns.def (movstr): New pattern.
	* builtins.c (HAVE_movstr, CODE_FOR_movstr): Delete.
	(expand_movstr): Use targetm rather than HAVE_movstr/
	CODE_FOR_movstr.

From-SVN: r227121
parent d26ed7fa
2015-08-24 Richard Sandiford <richard.sandiford@arm.com> 2015-08-24 Richard Sandiford <richard.sandiford@arm.com>
* target-insns.def (movstr): New pattern.
* builtins.c (HAVE_movstr, CODE_FOR_movstr): Delete.
(expand_movstr): Use targetm rather than HAVE_movstr/
CODE_FOR_movstr.
2015-08-24 Richard Sandiford <richard.sandiford@arm.com>
* config/microblaze/microblaze.c (microblaze_classify_unspec): Fix * config/microblaze/microblaze.c (microblaze_classify_unspec): Fix
cast syntax. cast syntax.
......
...@@ -3438,11 +3438,6 @@ expand_builtin_mempcpy_args (tree dest, tree src, tree len, ...@@ -3438,11 +3438,6 @@ expand_builtin_mempcpy_args (tree dest, tree src, tree len,
} }
} }
#ifndef HAVE_movstr
# define HAVE_movstr 0
# define CODE_FOR_movstr CODE_FOR_nothing
#endif
/* Expand into a movstr instruction, if one is available. Return NULL_RTX if /* Expand into a movstr instruction, if one is available. Return NULL_RTX if
we failed, the caller should emit a normal call, otherwise try to we failed, the caller should emit a normal call, otherwise try to
get the result in TARGET, if convenient. If ENDP is 0 return the get the result in TARGET, if convenient. If ENDP is 0 return the
...@@ -3457,7 +3452,7 @@ expand_movstr (tree dest, tree src, rtx target, int endp) ...@@ -3457,7 +3452,7 @@ expand_movstr (tree dest, tree src, rtx target, int endp)
rtx dest_mem; rtx dest_mem;
rtx src_mem; rtx src_mem;
if (!HAVE_movstr) if (!targetm.have_movstr ())
return NULL_RTX; return NULL_RTX;
dest_mem = get_memory_rtx (dest, NULL); dest_mem = get_memory_rtx (dest, NULL);
...@@ -3471,7 +3466,7 @@ expand_movstr (tree dest, tree src, rtx target, int endp) ...@@ -3471,7 +3466,7 @@ expand_movstr (tree dest, tree src, rtx target, int endp)
create_output_operand (&ops[0], endp ? target : NULL_RTX, Pmode); create_output_operand (&ops[0], endp ? target : NULL_RTX, Pmode);
create_fixed_operand (&ops[1], dest_mem); create_fixed_operand (&ops[1], dest_mem);
create_fixed_operand (&ops[2], src_mem); create_fixed_operand (&ops[2], src_mem);
if (!maybe_expand_insn (CODE_FOR_movstr, 3, ops)) if (!maybe_expand_insn (targetm.code_for_movstr, 3, ops))
return NULL_RTX; return NULL_RTX;
if (endp && target != const0_rtx) if (endp && target != const0_rtx)
......
...@@ -53,6 +53,7 @@ DEF_TARGET_INSN (load_multiple, (rtx x0, rtx x1, rtx x2)) ...@@ -53,6 +53,7 @@ DEF_TARGET_INSN (load_multiple, (rtx x0, rtx x1, rtx x2))
DEF_TARGET_INSN (mem_signal_fence, (rtx x0)) DEF_TARGET_INSN (mem_signal_fence, (rtx x0))
DEF_TARGET_INSN (mem_thread_fence, (rtx x0)) DEF_TARGET_INSN (mem_thread_fence, (rtx x0))
DEF_TARGET_INSN (memory_barrier, (void)) DEF_TARGET_INSN (memory_barrier, (void))
DEF_TARGET_INSN (movstr, (rtx x0, rtx x1, rtx x2))
DEF_TARGET_INSN (nonlocal_goto, (rtx x0, rtx x1, rtx x2, rtx x3)) DEF_TARGET_INSN (nonlocal_goto, (rtx x0, rtx x1, rtx x2, rtx x3))
DEF_TARGET_INSN (nonlocal_goto_receiver, (void)) DEF_TARGET_INSN (nonlocal_goto_receiver, (void))
DEF_TARGET_INSN (prefetch, (rtx x0, rtx x1, rtx x2)) DEF_TARGET_INSN (prefetch, (rtx x0, rtx x1, rtx x2))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment