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

Side by Side Diff: src/mips64/macro-assembler-mips64.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/mips64/macro-assembler-mips64.h ('k') | src/x64/macro-assembler-x64.h » ('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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
10 10
(...skipping 5911 matching lines...) Expand 10 before | Expand all | Expand 10 after
5922 5922
5923 5923
5924 void MacroAssembler::EnumLength(Register dst, Register map) { 5924 void MacroAssembler::EnumLength(Register dst, Register map) {
5925 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); 5925 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
5926 ld(dst, FieldMemOperand(map, Map::kBitField3Offset)); 5926 ld(dst, FieldMemOperand(map, Map::kBitField3Offset));
5927 And(dst, dst, Operand(Map::EnumLengthBits::kMask)); 5927 And(dst, dst, Operand(Map::EnumLengthBits::kMask));
5928 SmiTag(dst); 5928 SmiTag(dst);
5929 } 5929 }
5930 5930
5931 5931
5932 void MacroAssembler::LoadAccessor(Register dst, Register holder,
5933 int accessor_index,
5934 AccessorComponent accessor) {
5935 ld(dst, FieldMemOperand(holder, HeapObject::kMapOffset));
5936 LoadInstanceDescriptors(dst, dst);
5937 ld(dst,
5938 FieldMemOperand(dst, DescriptorArray::GetValueOffset(accessor_index)));
5939 int offset = accessor == ACCESSOR_GETTER ? AccessorPair::kGetterOffset
5940 : AccessorPair::kSetterOffset;
5941 ld(dst, FieldMemOperand(dst, offset));
5942 }
5943
5944
5932 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { 5945 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) {
5933 Register empty_fixed_array_value = a6; 5946 Register empty_fixed_array_value = a6;
5934 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); 5947 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex);
5935 Label next, start; 5948 Label next, start;
5936 mov(a2, a0); 5949 mov(a2, a0);
5937 5950
5938 // Check if the enum length field is properly initialized, indicating that 5951 // Check if the enum length field is properly initialized, indicating that
5939 // there is an enum cache. 5952 // there is an enum cache.
5940 ld(a1, FieldMemOperand(a2, HeapObject::kMapOffset)); 5953 ld(a1, FieldMemOperand(a2, HeapObject::kMapOffset));
5941 5954
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
6188 } 6201 }
6189 if (mag.shift > 0) sra(result, result, mag.shift); 6202 if (mag.shift > 0) sra(result, result, mag.shift);
6190 srl(at, dividend, 31); 6203 srl(at, dividend, 31);
6191 Addu(result, result, Operand(at)); 6204 Addu(result, result, Operand(at));
6192 } 6205 }
6193 6206
6194 6207
6195 } } // namespace v8::internal 6208 } } // namespace v8::internal
6196 6209
6197 #endif // V8_TARGET_ARCH_MIPS64 6210 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698