Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 159c924b5bf044a442f23f0b1e8919581a076788..cbb538f39d34d8977c978fd08681f5dbce3b31a8 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -3220,11 +3220,10 @@ void MacroAssembler::CopyBytes(Register src, |
Register dst, |
Register length, |
Register scratch) { |
- Label align_loop, align_loop_1, word_loop, byte_loop, byte_loop_1, done; |
+ Label align_loop_1, word_loop, byte_loop, byte_loop_1, done; |
// Align src before copying in word size chunks. |
- bind(&align_loop); |
- Branch(&done, eq, length, Operand(zero_reg)); |
+ Branch(&byte_loop, le, length, Operand(kPointerSize)); |
bind(&align_loop_1); |
And(scratch, src, kPointerSize - 1); |
Branch(&word_loop, eq, scratch, Operand(zero_reg)); |
@@ -3233,7 +3232,7 @@ void MacroAssembler::CopyBytes(Register src, |
sb(scratch, MemOperand(dst)); |
Addu(dst, dst, 1); |
Subu(length, length, Operand(1)); |
- Branch(&byte_loop_1, ne, length, Operand(zero_reg)); |
+ Branch(&align_loop_1, ne, length, Operand(zero_reg)); |
// Copy bytes in word size chunks. |
bind(&word_loop); |