Commit cd36edbd by Richard Henderson Committed by Richard Henderson

alpha.c (alpha_expand_block_move): Correctly collect block offsets.

* alpha.c (alpha_expand_block_move): Correctly collect block offsets.
(alpha_expand_block_clear): Likewise.

From-SVN: r19028
parent e814ca97
Tue Apr 7 02:01:47 1998 Richard Henderson <rth@cygnus.com>
* alpha.c (alpha_expand_block_move): Correctly collect block offsets.
(alpha_expand_block_clear): Likewise.
Mon Apr 6 23:36:01 1998 Richard Henderson <rth@cygnus.com> Mon Apr 6 23:36:01 1998 Richard Henderson <rth@cygnus.com>
* tree.h (sizetype_tab): Fix previous change for K&R. * tree.h (sizetype_tab): Fix previous change for K&R.
......
...@@ -1751,12 +1751,12 @@ alpha_expand_block_move (operands) ...@@ -1751,12 +1751,12 @@ alpha_expand_block_move (operands)
emit_move_insn (data_regs[nregs+i], emit_move_insn (data_regs[nregs+i],
change_address(orig_src, DImode, change_address(orig_src, DImode,
plus_constant (XEXP (orig_src, 0), plus_constant (XEXP (orig_src, 0),
i*8))); ofs + i*8)));
} }
nregs += words; nregs += words;
bytes -= words * 8; bytes -= words * 8;
ofs = words * 8; ofs += words * 8;
} }
if (src_align >= 4 && bytes >= 4) if (src_align >= 4 && bytes >= 4)
{ {
...@@ -1770,12 +1770,12 @@ alpha_expand_block_move (operands) ...@@ -1770,12 +1770,12 @@ alpha_expand_block_move (operands)
emit_move_insn (data_regs[nregs+i], emit_move_insn (data_regs[nregs+i],
change_address(orig_src, SImode, change_address(orig_src, SImode,
plus_constant (XEXP (orig_src, 0), plus_constant (XEXP (orig_src, 0),
i*4))); ofs + i*4)));
} }
nregs += words; nregs += words;
bytes -= words * 4; bytes -= words * 4;
ofs = words * 4; ofs += words * 4;
} }
if (bytes >= 16) if (bytes >= 16)
{ {
...@@ -1788,7 +1788,7 @@ alpha_expand_block_move (operands) ...@@ -1788,7 +1788,7 @@ alpha_expand_block_move (operands)
nregs += words; nregs += words;
bytes -= words * 8; bytes -= words * 8;
ofs = words * 8; ofs += words * 8;
} }
if (!TARGET_BWX && bytes >= 8) if (!TARGET_BWX && bytes >= 8)
{ {
...@@ -2025,14 +2025,14 @@ alpha_expand_block_clear (operands) ...@@ -2025,14 +2025,14 @@ alpha_expand_block_clear (operands)
{ {
emit_move_insn (change_address(orig_dst, DImode, emit_move_insn (change_address(orig_dst, DImode,
plus_constant (XEXP (orig_dst, 0), plus_constant (XEXP (orig_dst, 0),
i*8)), ofs + i*8)),
const0_rtx); const0_rtx);
} }
bytes -= words * 8; bytes -= words * 8;
ofs = words * 8; ofs += words * 8;
} }
else if (align >= 4 && bytes >= 4) if (align >= 4 && bytes >= 4)
{ {
words = bytes / 4; words = bytes / 4;
...@@ -2040,21 +2040,21 @@ alpha_expand_block_clear (operands) ...@@ -2040,21 +2040,21 @@ alpha_expand_block_clear (operands)
{ {
emit_move_insn (change_address(orig_dst, SImode, emit_move_insn (change_address(orig_dst, SImode,
plus_constant (XEXP (orig_dst, 0), plus_constant (XEXP (orig_dst, 0),
i*4)), ofs + i*4)),
const0_rtx); const0_rtx);
} }
bytes -= words * 4; bytes -= words * 4;
ofs = words * 4; ofs += words * 4;
} }
else if (bytes >= 16) if (bytes >= 16)
{ {
words = bytes / 8; words = bytes / 8;
alpha_expand_unaligned_store_words (NULL, orig_dst, words, 0); alpha_expand_unaligned_store_words (NULL, orig_dst, words, ofs);
bytes -= words * 8; bytes -= words * 8;
ofs = words * 8; ofs += words * 8;
} }
/* Next clean up any trailing pieces. We know from the contiguous /* Next clean up any trailing pieces. We know from the contiguous
......
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