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/ppc/ic-ppc.cc

Issue 1145223003: PPC: Cleanup interface descriptors to reflect that vectors are part of loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/ic/ppc/stub-cache-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 7 #if V8_TARGET_ARCH_PPC
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 } 292 }
293 293
294 294
295 // A register that isn't one of the parameters to the load ic. 295 // A register that isn't one of the parameters to the load ic.
296 static const Register LoadIC_TempRegister() { return r6; } 296 static const Register LoadIC_TempRegister() { return r6; }
297 297
298 298
299 static void LoadIC_PushArgs(MacroAssembler* masm) { 299 static void LoadIC_PushArgs(MacroAssembler* masm) {
300 Register receiver = LoadDescriptor::ReceiverRegister(); 300 Register receiver = LoadDescriptor::ReceiverRegister();
301 Register name = LoadDescriptor::NameRegister(); 301 Register name = LoadDescriptor::NameRegister();
302 Register slot = VectorLoadICDescriptor::SlotRegister(); 302 Register slot = LoadDescriptor::SlotRegister();
303 Register vector = VectorLoadICDescriptor::VectorRegister(); 303 Register vector = LoadWithVectorDescriptor::VectorRegister();
304 304
305 __ Push(receiver, name, slot, vector); 305 __ Push(receiver, name, slot, vector);
306 } 306 }
307 307
308 308
309 void LoadIC::GenerateMiss(MacroAssembler* masm) { 309 void LoadIC::GenerateMiss(MacroAssembler* masm) {
310 // The return address is in lr. 310 // The return address is in lr.
311 Isolate* isolate = masm->isolate(); 311 Isolate* isolate = masm->isolate();
312 312
313 DCHECK(!AreAliased(r7, r8, VectorLoadICDescriptor::SlotRegister(), 313 DCHECK(!AreAliased(r7, r8, LoadWithVectorDescriptor::SlotRegister(),
314 VectorLoadICDescriptor::VectorRegister())); 314 LoadWithVectorDescriptor::VectorRegister()));
315 __ IncrementCounter(isolate->counters()->load_miss(), 1, r7, r8); 315 __ IncrementCounter(isolate->counters()->load_miss(), 1, r7, r8);
316 316
317 LoadIC_PushArgs(masm); 317 LoadIC_PushArgs(masm);
318 318
319 // Perform tail call to the entry. 319 // Perform tail call to the entry.
320 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 320 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
321 int arg_count = 4; 321 int arg_count = 4;
322 __ TailCallExternalReference(ref, arg_count, 1); 322 __ TailCallExternalReference(ref, arg_count, 1);
323 } 323 }
324 324
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 __ Ret(); 441 __ Ret();
442 __ bind(&slow); 442 __ bind(&slow);
443 GenerateMiss(masm); 443 GenerateMiss(masm);
444 } 444 }
445 445
446 446
447 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 447 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
448 // The return address is in lr. 448 // The return address is in lr.
449 Isolate* isolate = masm->isolate(); 449 Isolate* isolate = masm->isolate();
450 450
451 DCHECK(!AreAliased(r7, r8, VectorLoadICDescriptor::SlotRegister(), 451 DCHECK(!AreAliased(r7, r8, LoadWithVectorDescriptor::SlotRegister(),
452 VectorLoadICDescriptor::VectorRegister())); 452 LoadWithVectorDescriptor::VectorRegister()));
453 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r7, r8); 453 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r7, r8);
454 454
455 LoadIC_PushArgs(masm); 455 LoadIC_PushArgs(masm);
456 456
457 // Perform tail call to the entry. 457 // Perform tail call to the entry.
458 ExternalReference ref = 458 ExternalReference ref =
459 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 459 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
460 int arg_count = 4; 460 int arg_count = 4;
461 __ TailCallExternalReference(ref, arg_count, 1); 461 __ TailCallExternalReference(ref, arg_count, 1);
462 } 462 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 // probe the dictionary. 529 // probe the dictionary.
530 __ LoadP(r6, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 530 __ LoadP(r6, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
531 __ LoadP(r7, FieldMemOperand(r6, HeapObject::kMapOffset)); 531 __ LoadP(r7, FieldMemOperand(r6, HeapObject::kMapOffset));
532 __ LoadRoot(ip, Heap::kHashTableMapRootIndex); 532 __ LoadRoot(ip, Heap::kHashTableMapRootIndex);
533 __ cmp(r7, ip); 533 __ cmp(r7, ip);
534 __ beq(&probe_dictionary); 534 __ beq(&probe_dictionary);
535 535
536 536
537 // The handlers in the stub cache expect a vector and slot. Since we won't 537 // The handlers in the stub cache expect a vector and slot. Since we won't
538 // change the IC from any downstream misses, a dummy vector can be used. 538 // change the IC from any downstream misses, a dummy vector can be used.
539 Register vector = VectorLoadICDescriptor::VectorRegister(); 539 Register vector = LoadWithVectorDescriptor::VectorRegister();
540 Register slot = VectorLoadICDescriptor::SlotRegister(); 540 Register slot = LoadWithVectorDescriptor::SlotRegister();
541 DCHECK(!AreAliased(vector, slot, r7, r8, r9, r10)); 541 DCHECK(!AreAliased(vector, slot, r7, r8, r9, r10));
542 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( 542 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
543 masm->isolate()->factory()->keyed_load_dummy_vector()); 543 masm->isolate()->factory()->keyed_load_dummy_vector());
544 int int_slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); 544 int int_slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0));
545 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); 545 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex);
546 __ LoadSmiLiteral(slot, Smi::FromInt(int_slot)); 546 __ LoadSmiLiteral(slot, Smi::FromInt(int_slot));
547 547
548 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 548 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
549 Code::ComputeHandlerFlags(Code::LOAD_IC)); 549 Code::ComputeHandlerFlags(Code::LOAD_IC));
550 masm->isolate()->stub_cache()->GenerateProbe( 550 masm->isolate()->stub_cache()->GenerateProbe(
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 patcher.EmitCondition(ne); 999 patcher.EmitCondition(ne);
1000 } else { 1000 } else {
1001 DCHECK(Assembler::GetCondition(branch_instr) == ne); 1001 DCHECK(Assembler::GetCondition(branch_instr) == ne);
1002 patcher.EmitCondition(eq); 1002 patcher.EmitCondition(eq);
1003 } 1003 }
1004 } 1004 }
1005 } 1005 }
1006 } // namespace v8::internal 1006 } // namespace v8::internal
1007 1007
1008 #endif // V8_TARGET_ARCH_PPC 1008 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/ic/ppc/stub-cache-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698