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

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

Issue 894053002: MIPS64: Megamorphic KeyedLoadIC needs special handling for vector ics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | 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 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 Map::kHasNamedInterceptor, &slow); 527 Map::kHasNamedInterceptor, &slow);
528 528
529 529
530 // If the receiver is a fast-case object, check the stub cache. Otherwise 530 // If the receiver is a fast-case object, check the stub cache. Otherwise
531 // probe the dictionary. 531 // probe the dictionary.
532 __ ld(a3, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 532 __ ld(a3, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
533 __ ld(a4, FieldMemOperand(a3, HeapObject::kMapOffset)); 533 __ ld(a4, FieldMemOperand(a3, HeapObject::kMapOffset));
534 __ LoadRoot(at, Heap::kHashTableMapRootIndex); 534 __ LoadRoot(at, Heap::kHashTableMapRootIndex);
535 __ Branch(&probe_dictionary, eq, a4, Operand(at)); 535 __ Branch(&probe_dictionary, eq, a4, Operand(at));
536 536
537 if (FLAG_vector_ics) {
538 // When vector ics are in use, the handlers in the stub cache expect a
539 // vector and slot. Since we won't change the IC from any downstream
540 // misses, a dummy vector can be used.
541 Register vector = VectorLoadICDescriptor::VectorRegister();
542 Register slot = VectorLoadICDescriptor::SlotRegister();
543 DCHECK(!AreAliased(vector, slot, a4, a5, a6, t1));
544 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
545 masm->isolate()->factory()->keyed_load_dummy_vector());
546 int int_slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0));
547 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex);
548 __ li(slot, Operand(Smi::FromInt(int_slot)));
549 }
550
537 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 551 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
538 Code::ComputeHandlerFlags(Code::LOAD_IC)); 552 Code::ComputeHandlerFlags(Code::LOAD_IC));
539 masm->isolate()->stub_cache()->GenerateProbe( 553 masm->isolate()->stub_cache()->GenerateProbe(
540 masm, Code::LOAD_IC, flags, false, receiver, key, a3, a4, a5, a6); 554 masm, Code::LOAD_IC, flags, false, receiver, key, a4, a5, a6, t1);
541 // Cache miss. 555 // Cache miss.
542 GenerateMiss(masm); 556 GenerateMiss(masm);
543 557
544 // Do a quick inline probe of the receiver's dictionary, if it 558 // Do a quick inline probe of the receiver's dictionary, if it
545 // exists. 559 // exists.
546 __ bind(&probe_dictionary); 560 __ bind(&probe_dictionary);
547 // a3: elements 561 // a3: elements
548 __ ld(a0, FieldMemOperand(receiver, HeapObject::kMapOffset)); 562 __ ld(a0, FieldMemOperand(receiver, HeapObject::kMapOffset));
549 __ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset)); 563 __ lbu(a0, FieldMemOperand(a0, Map::kInstanceTypeOffset));
550 GenerateGlobalInstanceTypeCheck(masm, a0, &slow); 564 GenerateGlobalInstanceTypeCheck(masm, a0, &slow);
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 patcher.ChangeBranchCondition(ne); 987 patcher.ChangeBranchCondition(ne);
974 } else { 988 } else {
975 DCHECK(Assembler::IsBne(branch_instr)); 989 DCHECK(Assembler::IsBne(branch_instr));
976 patcher.ChangeBranchCondition(eq); 990 patcher.ChangeBranchCondition(eq);
977 } 991 }
978 } 992 }
979 } 993 }
980 } // namespace v8::internal 994 } // namespace v8::internal
981 995
982 #endif // V8_TARGET_ARCH_MIPS64 996 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698