Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: src/ppc/macro-assembler-ppc.cc

Issue 2434753003: [cleanup] Delete MacroAssembler::CopyBytes, it is dead code (Closed)
Patch Set: update .golden files Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | src/s390/macro-assembler-s390.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/macro-assembler-ppc.cc
diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc
index 3bfe0ee078399f7e068eb7f509350b37bff25716..a4da3ed68b4eef034f6c7f0ce4a5aadeb5321d44 100644
--- a/src/ppc/macro-assembler-ppc.cc
+++ b/src/ppc/macro-assembler-ppc.cc
@@ -3176,73 +3176,6 @@ void MacroAssembler::AllocateJSValue(Register result, Register constructor,
STATIC_ASSERT(JSValue::kSize == 4 * kPointerSize);
}
-
-void MacroAssembler::CopyBytes(Register src, Register dst, Register length,
- Register scratch) {
- Label align_loop, aligned, word_loop, byte_loop, byte_loop_1, done;
-
- DCHECK(!scratch.is(r0));
-
- cmpi(length, Operand::Zero());
- beq(&done);
-
- // Check src alignment and length to see whether word_loop is possible
- andi(scratch, src, Operand(kPointerSize - 1));
- beq(&aligned, cr0);
- subfic(scratch, scratch, Operand(kPointerSize * 2));
- cmp(length, scratch);
- blt(&byte_loop);
-
- // Align src before copying in word size chunks.
- subi(scratch, scratch, Operand(kPointerSize));
- mtctr(scratch);
- bind(&align_loop);
- lbz(scratch, MemOperand(src));
- addi(src, src, Operand(1));
- subi(length, length, Operand(1));
- stb(scratch, MemOperand(dst));
- addi(dst, dst, Operand(1));
- bdnz(&align_loop);
-
- bind(&aligned);
-
- // Copy bytes in word size chunks.
- if (emit_debug_code()) {
- andi(r0, src, Operand(kPointerSize - 1));
- Assert(eq, kExpectingAlignmentForCopyBytes, cr0);
- }
-
- ShiftRightImm(scratch, length, Operand(kPointerSizeLog2));
- cmpi(scratch, Operand::Zero());
- beq(&byte_loop);
-
- mtctr(scratch);
- bind(&word_loop);
- LoadP(scratch, MemOperand(src));
- addi(src, src, Operand(kPointerSize));
- subi(length, length, Operand(kPointerSize));
-
- StoreP(scratch, MemOperand(dst));
- addi(dst, dst, Operand(kPointerSize));
- bdnz(&word_loop);
-
- // Copy the last bytes if any left.
- cmpi(length, Operand::Zero());
- beq(&done);
-
- bind(&byte_loop);
- mtctr(length);
- bind(&byte_loop_1);
- lbz(scratch, MemOperand(src));
- addi(src, src, Operand(1));
- stb(scratch, MemOperand(dst));
- addi(dst, dst, Operand(1));
- bdnz(&byte_loop_1);
-
- bind(&done);
-}
-
-
void MacroAssembler::InitializeNFieldsWithFiller(Register current_address,
Register count,
Register filler) {
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | src/s390/macro-assembler-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698