| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/x64/codegen-x64.h" | 5 #include "src/x64/codegen-x64.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 __ jmp(&done); | 236 __ jmp(&done); |
| 237 | 237 |
| 238 // Conversion loop. | 238 // Conversion loop. |
| 239 __ bind(&loop); | 239 __ bind(&loop); |
| 240 __ movp(rbx, | 240 __ movp(rbx, |
| 241 FieldOperand(r8, r9, times_pointer_size, FixedArray::kHeaderSize)); | 241 FieldOperand(r8, r9, times_pointer_size, FixedArray::kHeaderSize)); |
| 242 // r9 : current element's index | 242 // r9 : current element's index |
| 243 // rbx: current element (smi-tagged) | 243 // rbx: current element (smi-tagged) |
| 244 __ JumpIfNotSmi(rbx, &convert_hole); | 244 __ JumpIfNotSmi(rbx, &convert_hole); |
| 245 __ SmiToInteger32(rbx, rbx); | 245 __ SmiToInteger32(rbx, rbx); |
| 246 __ Cvtlsi2sd(xmm0, rbx); | 246 __ Cvtlsi2sd(kScratchDoubleReg, rbx); |
| 247 __ Movsd(FieldOperand(r14, r9, times_8, FixedDoubleArray::kHeaderSize), xmm0); | 247 __ Movsd(FieldOperand(r14, r9, times_8, FixedDoubleArray::kHeaderSize), |
| 248 kScratchDoubleReg); |
| 248 __ jmp(&entry); | 249 __ jmp(&entry); |
| 249 __ bind(&convert_hole); | 250 __ bind(&convert_hole); |
| 250 | 251 |
| 251 if (FLAG_debug_code) { | 252 if (FLAG_debug_code) { |
| 252 __ CompareRoot(rbx, Heap::kTheHoleValueRootIndex); | 253 __ CompareRoot(rbx, Heap::kTheHoleValueRootIndex); |
| 253 __ Assert(equal, kObjectFoundInSmiOnlyArray); | 254 __ Assert(equal, kObjectFoundInSmiOnlyArray); |
| 254 } | 255 } |
| 255 | 256 |
| 256 __ movq(FieldOperand(r14, r9, times_8, FixedDoubleArray::kHeaderSize), r15); | 257 __ movq(FieldOperand(r14, r9, times_8, FixedDoubleArray::kHeaderSize), r15); |
| 257 __ bind(&entry); | 258 __ bind(&entry); |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 return Operand(base_reg_, argument_count_reg_, times_pointer_size, | 635 return Operand(base_reg_, argument_count_reg_, times_pointer_size, |
| 635 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize); | 636 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize); |
| 636 } | 637 } |
| 637 } | 638 } |
| 638 | 639 |
| 639 | 640 |
| 640 } // namespace internal | 641 } // namespace internal |
| 641 } // namespace v8 | 642 } // namespace v8 |
| 642 | 643 |
| 643 #endif // V8_TARGET_ARCH_X64 | 644 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |