Commit 4c64a852 by Richard Kenner

(expand_block_move): Don't pass argument of # bytes to increment

pointers by to movstrsi expanders.

From-SVN: r9856
parent 3c67b673
...@@ -720,8 +720,7 @@ expand_block_move (operands) ...@@ -720,8 +720,7 @@ expand_block_move (operands)
emit_insn (gen_movstrsi_8reg (dest_reg, emit_insn (gen_movstrsi_8reg (dest_reg,
src_reg, src_reg,
GEN_INT ((move_bytes == 32) ? 0 : move_bytes), GEN_INT ((move_bytes == 32) ? 0 : move_bytes),
align_rtx, align_rtx));
GEN_INT ((bytes > move_bytes) ? move_bytes : 0)));
} }
else if (bytes > 16 /* move up to 24 bytes at a time */ else if (bytes > 16 /* move up to 24 bytes at a time */
&& !fixed_regs[7] && !fixed_regs[7]
...@@ -735,8 +734,7 @@ expand_block_move (operands) ...@@ -735,8 +734,7 @@ expand_block_move (operands)
emit_insn (gen_movstrsi_6reg (dest_reg, emit_insn (gen_movstrsi_6reg (dest_reg,
src_reg, src_reg,
GEN_INT (move_bytes), GEN_INT (move_bytes),
align_rtx, align_rtx));
GEN_INT ((bytes > move_bytes) ? move_bytes : 0)));
} }
else if (bytes > 8 /* move up to 16 bytes at a time */ else if (bytes > 8 /* move up to 16 bytes at a time */
&& !fixed_regs[9] && !fixed_regs[9]
...@@ -748,8 +746,7 @@ expand_block_move (operands) ...@@ -748,8 +746,7 @@ expand_block_move (operands)
emit_insn (gen_movstrsi_4reg (dest_reg, emit_insn (gen_movstrsi_4reg (dest_reg,
src_reg, src_reg,
GEN_INT (move_bytes), GEN_INT (move_bytes),
align_rtx, align_rtx));
GEN_INT ((bytes > move_bytes) ? move_bytes : 0)));
} }
else if (bytes > 4 && !TARGET_64BIT) else if (bytes > 4 && !TARGET_64BIT)
{ /* move up to 8 bytes at a time */ { /* move up to 8 bytes at a time */
...@@ -757,8 +754,7 @@ expand_block_move (operands) ...@@ -757,8 +754,7 @@ expand_block_move (operands)
emit_insn (gen_movstrsi_2reg (dest_reg, emit_insn (gen_movstrsi_2reg (dest_reg,
src_reg, src_reg,
GEN_INT (move_bytes), GEN_INT (move_bytes),
align_rtx, align_rtx));
GEN_INT ((bytes > move_bytes) ? move_bytes : 0)));
} }
else if (bytes >= 4 && (align >= 4 || !STRICT_ALIGNMENT)) else if (bytes >= 4 && (align >= 4 || !STRICT_ALIGNMENT))
{ /* move 4 bytes */ { /* move 4 bytes */
...@@ -766,11 +762,6 @@ expand_block_move (operands) ...@@ -766,11 +762,6 @@ expand_block_move (operands)
tmp_reg = gen_reg_rtx (SImode); tmp_reg = gen_reg_rtx (SImode);
emit_move_insn (tmp_reg, gen_rtx (MEM, SImode, src_reg)); emit_move_insn (tmp_reg, gen_rtx (MEM, SImode, src_reg));
emit_move_insn (gen_rtx (MEM, SImode, dest_reg), tmp_reg); emit_move_insn (gen_rtx (MEM, SImode, dest_reg), tmp_reg);
if (bytes > move_bytes)
{
emit_insn (gen_addsi3 (src_reg, src_reg, GEN_INT (move_bytes)));
emit_insn (gen_addsi3 (dest_reg, dest_reg, GEN_INT (move_bytes)));
}
} }
else if (bytes == 2 && (align >= 2 || !STRICT_ALIGNMENT)) else if (bytes == 2 && (align >= 2 || !STRICT_ALIGNMENT))
{ /* move 2 bytes */ { /* move 2 bytes */
...@@ -792,10 +783,15 @@ expand_block_move (operands) ...@@ -792,10 +783,15 @@ expand_block_move (operands)
emit_insn (gen_movstrsi_1reg (dest_reg, emit_insn (gen_movstrsi_1reg (dest_reg,
src_reg, src_reg,
GEN_INT (move_bytes), GEN_INT (move_bytes),
align_rtx, align_rtx));
GEN_INT ((bytes > move_bytes) ? move_bytes : 0)));
} }
} }
if (bytes > move_bytes)
{
emit_insn (gen_addsi3 (src_reg, src_reg, GEN_INT (move_bytes)));
emit_insn (gen_addsi3 (dest_reg, dest_reg, GEN_INT (move_bytes)));
}
} }
else /* string instructions not available */ else /* string instructions not available */
......
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