From: Michael Hayes Date: Sat, 16 Oct 1999 00:39:15 +0000 (+0000) Subject: c4x.md (movstrqi_small): Utilise parallel move instructions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0dced2c729c164873a10bccdbfff8d5dc6d2a820;p=gcc.git c4x.md (movstrqi_small): Utilise parallel move instructions. * config/c4x/c4x.md (movstrqi_small): Utilise parallel move instructions. From-SVN: r30033 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f7f0d1c89a..3b4c118fcd9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sat Oct 16 13:37:46 1999 Michael Hayes + + * config/c4x/c4x.md (movstrqi_small): Utilise parallel move + instructions. + Sat Oct 16 13:26:47 1999 Michael Hayes * config/c4x/c4x.md (*db_noclobber, diff --git a/gcc/config/c4x/c4x.md b/gcc/config/c4x/c4x.md index 3b40c370c76..7ef0d3217f2 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 {