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

Unified Diff: src/x87/macro-assembler-x87.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/x87/macro-assembler-x87.h ('k') | test/cctest/interpreter/bytecode_expectations/Generators.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/macro-assembler-x87.cc
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc
index e75318681f6a974df00bf6e376a320778f7ba026..95df94e06f52df980e266c7a7d9b623f13c035c3 100644
--- a/src/x87/macro-assembler-x87.cc
+++ b/src/x87/macro-assembler-x87.cc
@@ -1822,74 +1822,6 @@ void MacroAssembler::AllocateJSValue(Register result, Register constructor,
STATIC_ASSERT(JSValue::kSize == 4 * kPointerSize);
}
-
-// Copy memory, byte-by-byte, from source to destination. Not optimized for
-// long or aligned copies. The contents of scratch and length are destroyed.
-// Source and destination are incremented by length.
-// Many variants of movsb, loop unrolling, word moves, and indexed operands
-// have been tried here already, and this is fastest.
-// A simpler loop is faster on small copies, but 30% slower on large ones.
-// The cld() instruction must have been emitted, to set the direction flag(),
-// before calling this function.
-void MacroAssembler::CopyBytes(Register source,
- Register destination,
- Register length,
- Register scratch) {
- Label short_loop, len4, len8, len12, done, short_string;
- DCHECK(source.is(esi));
- DCHECK(destination.is(edi));
- DCHECK(length.is(ecx));
- cmp(length, Immediate(4));
- j(below, &short_string, Label::kNear);
-
- // Because source is 4-byte aligned in our uses of this function,
- // we keep source aligned for the rep_movs call by copying the odd bytes
- // at the end of the ranges.
- mov(scratch, Operand(source, length, times_1, -4));
- mov(Operand(destination, length, times_1, -4), scratch);
-
- cmp(length, Immediate(8));
- j(below_equal, &len4, Label::kNear);
- cmp(length, Immediate(12));
- j(below_equal, &len8, Label::kNear);
- cmp(length, Immediate(16));
- j(below_equal, &len12, Label::kNear);
-
- mov(scratch, ecx);
- shr(ecx, 2);
- rep_movs();
- and_(scratch, Immediate(0x3));
- add(destination, scratch);
- jmp(&done, Label::kNear);
-
- bind(&len12);
- mov(scratch, Operand(source, 8));
- mov(Operand(destination, 8), scratch);
- bind(&len8);
- mov(scratch, Operand(source, 4));
- mov(Operand(destination, 4), scratch);
- bind(&len4);
- mov(scratch, Operand(source, 0));
- mov(Operand(destination, 0), scratch);
- add(destination, length);
- jmp(&done, Label::kNear);
-
- bind(&short_string);
- test(length, length);
- j(zero, &done, Label::kNear);
-
- bind(&short_loop);
- mov_b(scratch, Operand(source, 0));
- mov_b(Operand(destination, 0), scratch);
- inc(source);
- inc(destination);
- dec(length);
- j(not_zero, &short_loop);
-
- bind(&done);
-}
-
-
void MacroAssembler::InitializeFieldsWithFiller(Register current_address,
Register end_address,
Register filler) {
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | test/cctest/interpreter/bytecode_expectations/Generators.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698