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

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

Issue 1144063002: Cleanup interface descriptors to reflect that vectors are part of loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes for test failures. Created 5 years, 7 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/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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 287 }
288 288
289 289
290 // A register that isn't one of the parameters to the load ic. 290 // A register that isn't one of the parameters to the load ic.
291 static const Register LoadIC_TempRegister() { return a3; } 291 static const Register LoadIC_TempRegister() { return a3; }
292 292
293 293
294 static void LoadIC_PushArgs(MacroAssembler* masm) { 294 static void LoadIC_PushArgs(MacroAssembler* masm) {
295 Register receiver = LoadDescriptor::ReceiverRegister(); 295 Register receiver = LoadDescriptor::ReceiverRegister();
296 Register name = LoadDescriptor::NameRegister(); 296 Register name = LoadDescriptor::NameRegister();
297 Register slot = VectorLoadICDescriptor::SlotRegister(); 297 Register slot = LoadDescriptor::SlotRegister();
298 Register vector = VectorLoadICDescriptor::VectorRegister(); 298 Register vector = LoadWithVectorDescriptor::VectorRegister();
299 299
300 __ Push(receiver, name, slot, vector); 300 __ Push(receiver, name, slot, vector);
301 } 301 }
302 302
303 303
304 void LoadIC::GenerateMiss(MacroAssembler* masm) { 304 void LoadIC::GenerateMiss(MacroAssembler* masm) {
305 // The return address is on the stack. 305 // The return address is on the stack.
306 Isolate* isolate = masm->isolate(); 306 Isolate* isolate = masm->isolate();
307 307
308 DCHECK(!AreAliased(a4, a5, VectorLoadICDescriptor::SlotRegister(), 308 DCHECK(!AreAliased(a4, a5, LoadWithVectorDescriptor::SlotRegister(),
309 VectorLoadICDescriptor::VectorRegister())); 309 LoadWithVectorDescriptor::VectorRegister()));
310 __ IncrementCounter(isolate->counters()->load_miss(), 1, a4, a5); 310 __ IncrementCounter(isolate->counters()->load_miss(), 1, a4, a5);
311 311
312 LoadIC_PushArgs(masm); 312 LoadIC_PushArgs(masm);
313 313
314 // Perform tail call to the entry. 314 // Perform tail call to the entry.
315 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 315 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
316 int arg_count = 4; 316 int arg_count = 4;
317 __ TailCallExternalReference(ref, arg_count, 1); 317 __ TailCallExternalReference(ref, arg_count, 1);
318 } 318 }
319 319
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 __ mov(v0, a0); // (In delay slot) return the value stored in v0. 436 __ mov(v0, a0); // (In delay slot) return the value stored in v0.
437 __ bind(&slow); 437 __ bind(&slow);
438 GenerateMiss(masm); 438 GenerateMiss(masm);
439 } 439 }
440 440
441 441
442 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 442 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
443 // The return address is in ra. 443 // The return address is in ra.
444 Isolate* isolate = masm->isolate(); 444 Isolate* isolate = masm->isolate();
445 445
446 DCHECK(!AreAliased(a4, a5, VectorLoadICDescriptor::SlotRegister(), 446 DCHECK(!AreAliased(a4, a5, LoadWithVectorDescriptor::SlotRegister(),
447 VectorLoadICDescriptor::VectorRegister())); 447 LoadWithVectorDescriptor::VectorRegister()));
448 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a4, a5); 448 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a4, a5);
449 449
450 LoadIC_PushArgs(masm); 450 LoadIC_PushArgs(masm);
451 451
452 // Perform tail call to the entry. 452 // Perform tail call to the entry.
453 ExternalReference ref = 453 ExternalReference ref =
454 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 454 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
455 455
456 int arg_count = 4; 456 int arg_count = 4;
457 __ TailCallExternalReference(ref, arg_count, 1); 457 __ TailCallExternalReference(ref, arg_count, 1);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 523
524 // If the receiver is a fast-case object, check the stub cache. Otherwise 524 // If the receiver is a fast-case object, check the stub cache. Otherwise
525 // probe the dictionary. 525 // probe the dictionary.
526 __ ld(a3, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 526 __ ld(a3, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
527 __ ld(a4, FieldMemOperand(a3, HeapObject::kMapOffset)); 527 __ ld(a4, FieldMemOperand(a3, HeapObject::kMapOffset));
528 __ LoadRoot(at, Heap::kHashTableMapRootIndex); 528 __ LoadRoot(at, Heap::kHashTableMapRootIndex);
529 __ Branch(&probe_dictionary, eq, a4, Operand(at)); 529 __ Branch(&probe_dictionary, eq, a4, Operand(at));
530 530
531 // The handlers in the stub cache expect a vector and slot. Since we won't 531 // The handlers in the stub cache expect a vector and slot. Since we won't
532 // change the IC from any downstream misses, a dummy vector can be used. 532 // change the IC from any downstream misses, a dummy vector can be used.
533 Register vector = VectorLoadICDescriptor::VectorRegister(); 533 Register vector = LoadWithVectorDescriptor::VectorRegister();
534 Register slot = VectorLoadICDescriptor::SlotRegister(); 534 Register slot = LoadWithVectorDescriptor::SlotRegister();
535 DCHECK(!AreAliased(vector, slot, a4, a5, a6, t1)); 535 DCHECK(!AreAliased(vector, slot, a4, a5, a6, t1));
536 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( 536 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
537 masm->isolate()->factory()->keyed_load_dummy_vector()); 537 masm->isolate()->factory()->keyed_load_dummy_vector());
538 int int_slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); 538 int int_slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0));
539 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); 539 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex);
540 __ li(slot, Operand(Smi::FromInt(int_slot))); 540 __ li(slot, Operand(Smi::FromInt(int_slot)));
541 541
542 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 542 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
543 Code::ComputeHandlerFlags(Code::LOAD_IC)); 543 Code::ComputeHandlerFlags(Code::LOAD_IC));
544 masm->isolate()->stub_cache()->GenerateProbe( 544 masm->isolate()->stub_cache()->GenerateProbe(
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 patcher.ChangeBranchCondition(ne); 978 patcher.ChangeBranchCondition(ne);
979 } else { 979 } else {
980 DCHECK(Assembler::IsBne(branch_instr)); 980 DCHECK(Assembler::IsBne(branch_instr));
981 patcher.ChangeBranchCondition(eq); 981 patcher.ChangeBranchCondition(eq);
982 } 982 }
983 } 983 }
984 } 984 }
985 } // namespace v8::internal 985 } // namespace v8::internal
986 986
987 #endif // V8_TARGET_ARCH_MIPS64 987 #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