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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 4366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4377 j(equal, &done); | 4377 j(equal, &done); |
4378 } else { | 4378 } else { |
4379 j(not_equal, miss); | 4379 j(not_equal, miss); |
4380 } | 4380 } |
4381 } | 4381 } |
4382 | 4382 |
4383 bind(&done); | 4383 bind(&done); |
4384 // Check that the value is a field property. | 4384 // Check that the value is a field property. |
4385 const int kDetailsOffset = | 4385 const int kDetailsOffset = |
4386 SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize; | 4386 SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize; |
4387 DCHECK_EQ(FIELD, 0); | 4387 DCHECK_EQ(DATA, 0); |
4388 Test(FieldOperand(elements, r2, times_pointer_size, kDetailsOffset), | 4388 Test(FieldOperand(elements, r2, times_pointer_size, kDetailsOffset), |
4389 Smi::FromInt(PropertyDetails::TypeField::kMask)); | 4389 Smi::FromInt(PropertyDetails::TypeField::kMask)); |
4390 j(not_zero, miss); | 4390 j(not_zero, miss); |
4391 | 4391 |
4392 // Get the value at the masked, scaled index. | 4392 // Get the value at the masked, scaled index. |
4393 const int kValueOffset = | 4393 const int kValueOffset = |
4394 SeededNumberDictionary::kElementsStartOffset + kPointerSize; | 4394 SeededNumberDictionary::kElementsStartOffset + kPointerSize; |
4395 movp(result, FieldOperand(elements, r2, times_pointer_size, kValueOffset)); | 4395 movp(result, FieldOperand(elements, r2, times_pointer_size, kValueOffset)); |
4396 } | 4396 } |
4397 | 4397 |
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5396 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); | 5396 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); |
5397 movl(rax, dividend); | 5397 movl(rax, dividend); |
5398 shrl(rax, Immediate(31)); | 5398 shrl(rax, Immediate(31)); |
5399 addl(rdx, rax); | 5399 addl(rdx, rax); |
5400 } | 5400 } |
5401 | 5401 |
5402 | 5402 |
5403 } } // namespace v8::internal | 5403 } } // namespace v8::internal |
5404 | 5404 |
5405 #endif // V8_TARGET_ARCH_X64 | 5405 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |