diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-05-31 20:50:52 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-05-31 20:50:52 -0400 |
commit | 4c64a85262abba7799c4fddeb0a350c34fde4cb2 (patch) | |
tree | 3c9bde0908b63e6271d3aef4215d75dcd2a86022 | |
parent | 3c67b67326c4284c79edc1c7aa0579351d85f5f6 (diff) | |
download | gcc-4c64a85262abba7799c4fddeb0a350c34fde4cb2.zip gcc-4c64a85262abba7799c4fddeb0a350c34fde4cb2.tar.gz gcc-4c64a85262abba7799c4fddeb0a350c34fde4cb2.tar.bz2 |
(expand_block_move): Don't pass argument of # bytes to increment
pointers by to movstrsi expanders.
From-SVN: r9856
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index cdf8732..5ae1507 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -720,8 +720,7 @@ expand_block_move (operands) emit_insn (gen_movstrsi_8reg (dest_reg, src_reg, GEN_INT ((move_bytes == 32) ? 0 : move_bytes), - align_rtx, - GEN_INT ((bytes > move_bytes) ? move_bytes : 0))); + align_rtx)); } else if (bytes > 16 /* move up to 24 bytes at a time */ && !fixed_regs[7] @@ -735,8 +734,7 @@ expand_block_move (operands) emit_insn (gen_movstrsi_6reg (dest_reg, src_reg, GEN_INT (move_bytes), - align_rtx, - GEN_INT ((bytes > move_bytes) ? move_bytes : 0))); + align_rtx)); } else if (bytes > 8 /* move up to 16 bytes at a time */ && !fixed_regs[9] @@ -748,8 +746,7 @@ expand_block_move (operands) emit_insn (gen_movstrsi_4reg (dest_reg, src_reg, GEN_INT (move_bytes), - align_rtx, - GEN_INT ((bytes > move_bytes) ? move_bytes : 0))); + align_rtx)); } else if (bytes > 4 && !TARGET_64BIT) { /* move up to 8 bytes at a time */ @@ -757,8 +754,7 @@ expand_block_move (operands) emit_insn (gen_movstrsi_2reg (dest_reg, src_reg, GEN_INT (move_bytes), - align_rtx, - GEN_INT ((bytes > move_bytes) ? move_bytes : 0))); + align_rtx)); } else if (bytes >= 4 && (align >= 4 || !STRICT_ALIGNMENT)) { /* move 4 bytes */ @@ -766,11 +762,6 @@ expand_block_move (operands) tmp_reg = gen_reg_rtx (SImode); emit_move_insn (tmp_reg, gen_rtx (MEM, SImode, src_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)) { /* move 2 bytes */ @@ -792,10 +783,15 @@ expand_block_move (operands) emit_insn (gen_movstrsi_1reg (dest_reg, src_reg, GEN_INT (move_bytes), - align_rtx, - GEN_INT ((bytes > move_bytes) ? move_bytes : 0))); + align_rtx)); } } + + 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 */ |