| Index: src/x64/macro-assembler-x64.cc
|
| diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
|
| index 0a739dacfb0c472ee72de508b5c4552852cc4086..08117b2c218e73d7ff7b53c8bed829cd08cdc6f0 100644
|
| --- a/src/x64/macro-assembler-x64.cc
|
| +++ b/src/x64/macro-assembler-x64.cc
|
| @@ -5174,93 +5174,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.
|
| -// Destination is incremented by length, source, length and scratch are
|
| -// clobbered.
|
| -// A simpler loop is faster on small copies, but slower on large ones.
|
| -// The cld() instruction must have been emitted, to set the direction flag(),
|
| -// before calling this function.
|
| -void MacroAssembler::CopyBytes(Register destination,
|
| - Register source,
|
| - Register length,
|
| - int min_length,
|
| - Register scratch) {
|
| - DCHECK(min_length >= 0);
|
| - if (emit_debug_code()) {
|
| - cmpl(length, Immediate(min_length));
|
| - Assert(greater_equal, kInvalidMinLength);
|
| - }
|
| - Label short_loop, len8, len16, len24, done, short_string;
|
| -
|
| - const int kLongStringLimit = 4 * kPointerSize;
|
| - if (min_length <= kLongStringLimit) {
|
| - cmpl(length, Immediate(kPointerSize));
|
| - j(below, &short_string, Label::kNear);
|
| - }
|
| -
|
| - DCHECK(source.is(rsi));
|
| - DCHECK(destination.is(rdi));
|
| - DCHECK(length.is(rcx));
|
| -
|
| - if (min_length <= kLongStringLimit) {
|
| - cmpl(length, Immediate(2 * kPointerSize));
|
| - j(below_equal, &len8, Label::kNear);
|
| - cmpl(length, Immediate(3 * kPointerSize));
|
| - j(below_equal, &len16, Label::kNear);
|
| - cmpl(length, Immediate(4 * kPointerSize));
|
| - j(below_equal, &len24, Label::kNear);
|
| - }
|
| -
|
| - // Because source is 8-byte aligned in our uses of this function,
|
| - // we keep source aligned for the rep movs operation by copying the odd bytes
|
| - // at the end of the ranges.
|
| - movp(scratch, length);
|
| - shrl(length, Immediate(kPointerSizeLog2));
|
| - repmovsp();
|
| - // Move remaining bytes of length.
|
| - andl(scratch, Immediate(kPointerSize - 1));
|
| - movp(length, Operand(source, scratch, times_1, -kPointerSize));
|
| - movp(Operand(destination, scratch, times_1, -kPointerSize), length);
|
| - addp(destination, scratch);
|
| -
|
| - if (min_length <= kLongStringLimit) {
|
| - jmp(&done, Label::kNear);
|
| - bind(&len24);
|
| - movp(scratch, Operand(source, 2 * kPointerSize));
|
| - movp(Operand(destination, 2 * kPointerSize), scratch);
|
| - bind(&len16);
|
| - movp(scratch, Operand(source, kPointerSize));
|
| - movp(Operand(destination, kPointerSize), scratch);
|
| - bind(&len8);
|
| - movp(scratch, Operand(source, 0));
|
| - movp(Operand(destination, 0), scratch);
|
| - // Move remaining bytes of length.
|
| - movp(scratch, Operand(source, length, times_1, -kPointerSize));
|
| - movp(Operand(destination, length, times_1, -kPointerSize), scratch);
|
| - addp(destination, length);
|
| - jmp(&done, Label::kNear);
|
| -
|
| - bind(&short_string);
|
| - if (min_length == 0) {
|
| - testl(length, length);
|
| - j(zero, &done, Label::kNear);
|
| - }
|
| -
|
| - bind(&short_loop);
|
| - movb(scratch, Operand(source, 0));
|
| - movb(Operand(destination, 0), scratch);
|
| - incp(source);
|
| - incp(destination);
|
| - decl(length);
|
| - j(not_zero, &short_loop, Label::kNear);
|
| - }
|
| -
|
| - bind(&done);
|
| -}
|
| -
|
| -
|
| void MacroAssembler::InitializeFieldsWithFiller(Register current_address,
|
| Register end_address,
|
| Register filler) {
|
|
|