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

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

Issue 1249433004: PPC: Unify "runtime-style" IC functions with Runtime intrinsics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/ppc/handler-compiler-ppc.cc ('k') | src/ppc/code-stubs-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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // The return address is in lr. 316 // The return address is in lr.
317 Isolate* isolate = masm->isolate(); 317 Isolate* isolate = masm->isolate();
318 318
319 DCHECK(!AreAliased(r7, r8, LoadWithVectorDescriptor::SlotRegister(), 319 DCHECK(!AreAliased(r7, r8, LoadWithVectorDescriptor::SlotRegister(),
320 LoadWithVectorDescriptor::VectorRegister())); 320 LoadWithVectorDescriptor::VectorRegister()));
321 __ IncrementCounter(isolate->counters()->load_miss(), 1, r7, r8); 321 __ IncrementCounter(isolate->counters()->load_miss(), 1, r7, r8);
322 322
323 LoadIC_PushArgs(masm); 323 LoadIC_PushArgs(masm);
324 324
325 // Perform tail call to the entry. 325 // Perform tail call to the entry.
326 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
327 int arg_count = 4; 326 int arg_count = 4;
328 __ TailCallExternalReference(ref, arg_count, 1); 327 __ TailCallRuntime(Runtime::kLoadIC_Miss, arg_count, 1);
329 } 328 }
330 329
331 330
332 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm, 331 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
333 LanguageMode language_mode) { 332 LanguageMode language_mode) {
334 // The return address is in lr. 333 // The return address is in lr.
335 334
336 __ mr(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister()); 335 __ mr(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
337 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister()); 336 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
338 337
339 // Do tail-call to runtime routine. 338 // Do tail-call to runtime routine.
340 __ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong 339 __ TailCallRuntime(is_strong(language_mode) ? Runtime::kGetPropertyStrong
341 : Runtime::kGetProperty, 340 : Runtime::kGetProperty,
342 2, 1); 341 2, 1);
343 } 342 }
344 343
345 344
346 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 345 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
347 // The return address is in lr. 346 // The return address is in lr.
348 Isolate* isolate = masm->isolate(); 347 Isolate* isolate = masm->isolate();
349 348
350 DCHECK(!AreAliased(r7, r8, LoadWithVectorDescriptor::SlotRegister(), 349 DCHECK(!AreAliased(r7, r8, LoadWithVectorDescriptor::SlotRegister(),
351 LoadWithVectorDescriptor::VectorRegister())); 350 LoadWithVectorDescriptor::VectorRegister()));
352 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r7, r8); 351 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r7, r8);
353 352
354 LoadIC_PushArgs(masm); 353 LoadIC_PushArgs(masm);
355 354
356 // Perform tail call to the entry. 355 // Perform tail call to the entry.
357 ExternalReference ref =
358 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
359 int arg_count = 4; 356 int arg_count = 4;
360 __ TailCallExternalReference(ref, arg_count, 1); 357 __ TailCallRuntime(Runtime::kKeyedLoadIC_Miss, arg_count, 1);
361 } 358 }
362 359
363 360
364 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm, 361 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
365 LanguageMode language_mode) { 362 LanguageMode language_mode) {
366 // The return address is in lr. 363 // The return address is in lr.
367 364
368 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); 365 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
369 366
370 // Do tail-call to runtime routine. 367 // Do tail-call to runtime routine.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 // Now jump to the place where smi keys are handled. 472 // Now jump to the place where smi keys are handled.
476 __ b(&index_smi); 473 __ b(&index_smi);
477 } 474 }
478 475
479 476
480 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 477 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
481 // Push receiver, key and value for runtime call. 478 // Push receiver, key and value for runtime call.
482 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 479 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
483 StoreDescriptor::ValueRegister()); 480 StoreDescriptor::ValueRegister());
484 481
485 ExternalReference ref = 482 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 3, 1);
486 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
487 __ TailCallExternalReference(ref, 3, 1);
488 } 483 }
489 484
490 485
491 static void KeyedStoreGenerateMegamorphicHelper( 486 static void KeyedStoreGenerateMegamorphicHelper(
492 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, 487 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow,
493 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, 488 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length,
494 Register value, Register key, Register receiver, Register receiver_map, 489 Register value, Register key, Register receiver, Register receiver_map,
495 Register elements_map, Register elements) { 490 Register elements_map, Register elements) {
496 Label transition_smi_elements; 491 Label transition_smi_elements;
497 Label finish_object_store, non_double_value, transition_double_elements; 492 Label finish_object_store, non_double_value, transition_double_elements;
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 // Cache miss: Jump to runtime. 778 // Cache miss: Jump to runtime.
784 GenerateMiss(masm); 779 GenerateMiss(masm);
785 } 780 }
786 781
787 782
788 void StoreIC::GenerateMiss(MacroAssembler* masm) { 783 void StoreIC::GenerateMiss(MacroAssembler* masm) {
789 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 784 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
790 StoreDescriptor::ValueRegister()); 785 StoreDescriptor::ValueRegister());
791 786
792 // Perform tail call to the entry. 787 // Perform tail call to the entry.
793 ExternalReference ref = 788 __ TailCallRuntime(Runtime::kStoreIC_Miss, 3, 1);
794 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
795 __ TailCallExternalReference(ref, 3, 1);
796 } 789 }
797 790
798 791
799 void StoreIC::GenerateNormal(MacroAssembler* masm) { 792 void StoreIC::GenerateNormal(MacroAssembler* masm) {
800 Label miss; 793 Label miss;
801 Register receiver = StoreDescriptor::ReceiverRegister(); 794 Register receiver = StoreDescriptor::ReceiverRegister();
802 Register name = StoreDescriptor::NameRegister(); 795 Register name = StoreDescriptor::NameRegister();
803 Register value = StoreDescriptor::ValueRegister(); 796 Register value = StoreDescriptor::ValueRegister();
804 Register dictionary = r6; 797 Register dictionary = r6;
805 DCHECK(receiver.is(r4)); 798 DCHECK(receiver.is(r4));
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 patcher.EmitCondition(ne); 907 patcher.EmitCondition(ne);
915 } else { 908 } else {
916 DCHECK(Assembler::GetCondition(branch_instr) == ne); 909 DCHECK(Assembler::GetCondition(branch_instr) == ne);
917 patcher.EmitCondition(eq); 910 patcher.EmitCondition(eq);
918 } 911 }
919 } 912 }
920 } // namespace internal 913 } // namespace internal
921 } // namespace v8 914 } // namespace v8
922 915
923 #endif // V8_TARGET_ARCH_PPC 916 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ic/ppc/handler-compiler-ppc.cc ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698