Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 9286666ea7d08a21e652eeafade38097f0c42f2d..cea7d3fa5fa571ee94f872601820b334c891b5bc 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -3209,20 +3209,19 @@ 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); |
- cmp(length, Operand::Zero()); |
- b(eq, &done); |
+ cmp(length, Operand(kPointerSize)); |
+ b(le, &byte_loop); |
+ |
bind(&align_loop_1); |
tst(src, Operand(kPointerSize - 1)); |
b(eq, &word_loop); |
ldrb(scratch, MemOperand(src, 1, PostIndex)); |
strb(scratch, MemOperand(dst, 1, PostIndex)); |
sub(length, length, Operand(1), SetCC); |
- b(ne, &byte_loop_1); |
- |
+ b(&align_loop_1); |
// Copy bytes in word size chunks. |
bind(&word_loop); |
if (emit_debug_code()) { |