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

Side by Side Diff: src/ic/mips64/ic-mips64.cc

Issue 546733003: MIPS: To aid vector-based load ic work, we need to be able to handle the megamorphic load case in h… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/mips/stub-cache-mips.cc ('k') | src/ic/mips64/stub-cache-mips64.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 5
6 #include "src/v8.h" 6 #include "src/v8.h"
7 7
8 #if V8_TARGET_ARCH_MIPS64 8 #if V8_TARGET_ARCH_MIPS64
9 9
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // map: key map 241 // map: key map
242 __ lbu(hash, FieldMemOperand(map, Map::kInstanceTypeOffset)); 242 __ lbu(hash, FieldMemOperand(map, Map::kInstanceTypeOffset));
243 STATIC_ASSERT(kInternalizedTag == 0); 243 STATIC_ASSERT(kInternalizedTag == 0);
244 __ And(at, hash, Operand(kIsNotInternalizedMask)); 244 __ And(at, hash, Operand(kIsNotInternalizedMask));
245 __ Branch(not_unique, ne, at, Operand(zero_reg)); 245 __ Branch(not_unique, ne, at, Operand(zero_reg));
246 246
247 __ bind(&unique); 247 __ bind(&unique);
248 } 248 }
249 249
250 250
251 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
252 // The return address is in lr.
253 Register receiver = LoadDescriptor::ReceiverRegister();
254 Register name = LoadDescriptor::NameRegister();
255 DCHECK(receiver.is(a1));
256 DCHECK(name.is(a2));
257
258 // Probe the stub cache.
259 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
260 Code::ComputeHandlerFlags(Code::LOAD_IC));
261 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, a3,
262 a4, a5, a6);
263
264 // Cache miss: Jump to runtime.
265 GenerateMiss(masm);
266 }
267
268
269 void LoadIC::GenerateNormal(MacroAssembler* masm) { 251 void LoadIC::GenerateNormal(MacroAssembler* masm) {
270 Register dictionary = a0; 252 Register dictionary = a0;
271 DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister())); 253 DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
272 DCHECK(!dictionary.is(LoadDescriptor::NameRegister())); 254 DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
273 Label slow; 255 Label slow;
274 256
275 __ ld(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(), 257 __ ld(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(),
276 JSObject::kPropertiesOffset)); 258 JSObject::kPropertiesOffset));
277 GenerateDictionaryLoad(masm, &slow, dictionary, 259 GenerateDictionaryLoad(masm, &slow, dictionary,
278 LoadDescriptor::NameRegister(), v0, a3, a4); 260 LoadDescriptor::NameRegister(), v0, a3, a4);
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 950 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
969 Register receiver = StoreDescriptor::ReceiverRegister(); 951 Register receiver = StoreDescriptor::ReceiverRegister();
970 Register name = StoreDescriptor::NameRegister(); 952 Register name = StoreDescriptor::NameRegister();
971 DCHECK(receiver.is(a1)); 953 DCHECK(receiver.is(a1));
972 DCHECK(name.is(a2)); 954 DCHECK(name.is(a2));
973 DCHECK(StoreDescriptor::ValueRegister().is(a0)); 955 DCHECK(StoreDescriptor::ValueRegister().is(a0));
974 956
975 // Get the receiver from the stack and probe the stub cache. 957 // Get the receiver from the stack and probe the stub cache.
976 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 958 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
977 Code::ComputeHandlerFlags(Code::STORE_IC)); 959 Code::ComputeHandlerFlags(Code::STORE_IC));
978 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, a3, 960 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver,
979 a4, a5, a6); 961 name, a3, a4, a5, a6);
980 962
981 // Cache miss: Jump to runtime. 963 // Cache miss: Jump to runtime.
982 GenerateMiss(masm); 964 GenerateMiss(masm);
983 } 965 }
984 966
985 967
986 void StoreIC::GenerateMiss(MacroAssembler* masm) { 968 void StoreIC::GenerateMiss(MacroAssembler* masm) {
987 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 969 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
988 StoreDescriptor::ValueRegister()); 970 StoreDescriptor::ValueRegister());
989 // Perform tail call to the entry. 971 // Perform tail call to the entry.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 patcher.ChangeBranchCondition(ne); 1088 patcher.ChangeBranchCondition(ne);
1107 } else { 1089 } else {
1108 DCHECK(Assembler::IsBne(branch_instr)); 1090 DCHECK(Assembler::IsBne(branch_instr));
1109 patcher.ChangeBranchCondition(eq); 1091 patcher.ChangeBranchCondition(eq);
1110 } 1092 }
1111 } 1093 }
1112 } 1094 }
1113 } // namespace v8::internal 1095 } // namespace v8::internal
1114 1096
1115 #endif // V8_TARGET_ARCH_MIPS64 1097 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/ic/mips/stub-cache-mips.cc ('k') | src/ic/mips64/stub-cache-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698