Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: src/x87/macro-assembler-x87.cc

Issue 886503002: Extract LoadAccessor into a masm function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix whitespace Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698