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

Side by Side Diff: src/ia32/macro-assembler-ia32.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/ia32/macro-assembler-ia32.h ('k') | src/ic/arm/handler-compiler-arm.cc » ('j') | 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_IA32 7 #if V8_TARGET_ARCH_IA32
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 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after
2664 mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset)); 2664 mov(descriptors, FieldOperand(map, Map::kDescriptorsOffset));
2665 } 2665 }
2666 2666
2667 2667
2668 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { 2668 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) {
2669 mov(dst, FieldOperand(map, Map::kBitField3Offset)); 2669 mov(dst, FieldOperand(map, Map::kBitField3Offset));
2670 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); 2670 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst);
2671 } 2671 }
2672 2672
2673 2673
2674 void MacroAssembler::LoadAccessor(Register dst, Register holder,
2675 int accessor_index,
2676 AccessorComponent accessor) {
2677 mov(dst, FieldOperand(holder, HeapObject::kMapOffset));
2678 LoadInstanceDescriptors(dst, dst);
2679 mov(dst, FieldOperand(dst, DescriptorArray::GetValueOffset(accessor_index)));
2680 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset
2681 : AccessorPair::kSetterOffset;
2682 mov(dst, FieldOperand(dst, offset));
2683 }
2684
2685
2674 void MacroAssembler::LoadPowerOf2(XMMRegister dst, 2686 void MacroAssembler::LoadPowerOf2(XMMRegister dst,
2675 Register scratch, 2687 Register scratch,
2676 int power) { 2688 int power) {
2677 DCHECK(is_uintn(power + HeapNumber::kExponentBias, 2689 DCHECK(is_uintn(power + HeapNumber::kExponentBias,
2678 HeapNumber::kExponentBits)); 2690 HeapNumber::kExponentBits));
2679 mov(scratch, Immediate(power + HeapNumber::kExponentBias)); 2691 mov(scratch, Immediate(power + HeapNumber::kExponentBias));
2680 movd(dst, scratch); 2692 movd(dst, scratch);
2681 psllq(dst, HeapNumber::kMantissaBits); 2693 psllq(dst, HeapNumber::kMantissaBits);
2682 } 2694 }
2683 2695
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
3266 if (mag.shift > 0) sar(edx, mag.shift); 3278 if (mag.shift > 0) sar(edx, mag.shift);
3267 mov(eax, dividend); 3279 mov(eax, dividend);
3268 shr(eax, 31); 3280 shr(eax, 31);
3269 add(edx, eax); 3281 add(edx, eax);
3270 } 3282 }
3271 3283
3272 3284
3273 } } // namespace v8::internal 3285 } } // namespace v8::internal
3274 3286
3275 #endif // V8_TARGET_ARCH_IA32 3287 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic/arm/handler-compiler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698