| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 4172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4183 } | 4183 } |
| 4184 | 4184 |
| 4185 ASSERT(source.is(rsi)); | 4185 ASSERT(source.is(rsi)); |
| 4186 ASSERT(destination.is(rdi)); | 4186 ASSERT(destination.is(rdi)); |
| 4187 ASSERT(length.is(rcx)); | 4187 ASSERT(length.is(rcx)); |
| 4188 | 4188 |
| 4189 // Because source is 8-byte aligned in our uses of this function, | 4189 // Because source is 8-byte aligned in our uses of this function, |
| 4190 // we keep source aligned for the rep movs operation by copying the odd bytes | 4190 // we keep source aligned for the rep movs operation by copying the odd bytes |
| 4191 // at the end of the ranges. | 4191 // at the end of the ranges. |
| 4192 movq(scratch, length); | 4192 movq(scratch, length); |
| 4193 shrl(length, Immediate(3)); | 4193 shrl(length, Immediate(kPointerSizeLog2)); |
| 4194 repmovsq(); | 4194 repmovsq(); |
| 4195 // Move remaining bytes of length. | 4195 // Move remaining bytes of length. |
| 4196 andl(scratch, Immediate(0x7)); | 4196 andl(scratch, Immediate(kPointerSize - 1)); |
| 4197 movq(length, Operand(source, scratch, times_1, -8)); | 4197 movq(length, Operand(source, scratch, times_1, -kPointerSize)); |
| 4198 movq(Operand(destination, scratch, times_1, -8), length); | 4198 movq(Operand(destination, scratch, times_1, -kPointerSize), length); |
| 4199 addq(destination, scratch); | 4199 addq(destination, scratch); |
| 4200 | 4200 |
| 4201 if (min_length <= kLongStringLimit) { | 4201 if (min_length <= kLongStringLimit) { |
| 4202 jmp(&done); | 4202 jmp(&done); |
| 4203 | 4203 |
| 4204 bind(&short_string); | 4204 bind(&short_string); |
| 4205 if (min_length == 0) { | 4205 if (min_length == 0) { |
| 4206 testl(length, length); | 4206 testl(length, length); |
| 4207 j(zero, &done); | 4207 j(zero, &done); |
| 4208 } | 4208 } |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4701 j(greater, &no_info_available); | 4701 j(greater, &no_info_available); |
| 4702 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 4702 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
| 4703 Heap::kAllocationSiteInfoMapRootIndex); | 4703 Heap::kAllocationSiteInfoMapRootIndex); |
| 4704 bind(&no_info_available); | 4704 bind(&no_info_available); |
| 4705 } | 4705 } |
| 4706 | 4706 |
| 4707 | 4707 |
| 4708 } } // namespace v8::internal | 4708 } } // namespace v8::internal |
| 4709 | 4709 |
| 4710 #endif // V8_TARGET_ARCH_X64 | 4710 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |