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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2610 mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset)); | 2610 mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset)); |
2611 } | 2611 } |
2612 | 2612 |
2613 | 2613 |
2614 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { | 2614 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { |
2615 mov(dst, FieldOperand(map, Map::kBitField3Offset)); | 2615 mov(dst, FieldOperand(map, Map::kBitField3Offset)); |
2616 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); | 2616 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); |
2617 } | 2617 } |
2618 | 2618 |
2619 | 2619 |
| 2620 void MacroAssembler::LoadAccessor(Register dst, Register holder, |
| 2621 int accessor_index, |
| 2622 AccessorComponent accessor) { |
| 2623 mov(dst, FieldOperand(holder, HeapObject::kMapOffset)); |
| 2624 LoadInstanceDescriptors(dst, dst); |
| 2625 mov(dst, FieldOperand(dst, DescriptorArray::GetValueOffset(accessor_index))); |
| 2626 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset |
| 2627 : AccessorPair::kSetterOffset; |
| 2628 mov(dst, FieldOperand(dst, offset)); |
| 2629 } |
| 2630 |
| 2631 |
2620 void MacroAssembler::LookupNumberStringCache(Register object, | 2632 void MacroAssembler::LookupNumberStringCache(Register object, |
2621 Register result, | 2633 Register result, |
2622 Register scratch1, | 2634 Register scratch1, |
2623 Register scratch2, | 2635 Register scratch2, |
2624 Label* not_found) { | 2636 Label* not_found) { |
2625 // Use of registers. Register result is used as a temporary. | 2637 // Use of registers. Register result is used as a temporary. |
2626 Register number_string_cache = result; | 2638 Register number_string_cache = result; |
2627 Register mask = scratch1; | 2639 Register mask = scratch1; |
2628 Register scratch = scratch2; | 2640 Register scratch = scratch2; |
2629 | 2641 |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3202 if (mag.shift > 0) sar(edx, mag.shift); | 3214 if (mag.shift > 0) sar(edx, mag.shift); |
3203 mov(eax, dividend); | 3215 mov(eax, dividend); |
3204 shr(eax, 31); | 3216 shr(eax, 31); |
3205 add(edx, eax); | 3217 add(edx, eax); |
3206 } | 3218 } |
3207 | 3219 |
3208 | 3220 |
3209 } } // namespace v8::internal | 3221 } } // namespace v8::internal |
3210 | 3222 |
3211 #endif // V8_TARGET_ARCH_X87 | 3223 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |