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

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

Issue 1248303002: Unify runtime-style IC functions with Runtime intrinsics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup Created 5 years, 5 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 7 #if V8_TARGET_ARCH_ARM64
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 DCHECK(!AreAliased(x4, x5, LoadWithVectorDescriptor::SlotRegister(), 290 DCHECK(!AreAliased(x4, x5, LoadWithVectorDescriptor::SlotRegister(),
291 LoadWithVectorDescriptor::VectorRegister())); 291 LoadWithVectorDescriptor::VectorRegister()));
292 __ IncrementCounter(isolate->counters()->load_miss(), 1, x4, x5); 292 __ IncrementCounter(isolate->counters()->load_miss(), 1, x4, x5);
293 293
294 // Perform tail call to the entry. 294 // Perform tail call to the entry.
295 __ Push(LoadWithVectorDescriptor::ReceiverRegister(), 295 __ Push(LoadWithVectorDescriptor::ReceiverRegister(),
296 LoadWithVectorDescriptor::NameRegister(), 296 LoadWithVectorDescriptor::NameRegister(),
297 LoadWithVectorDescriptor::SlotRegister(), 297 LoadWithVectorDescriptor::SlotRegister(),
298 LoadWithVectorDescriptor::VectorRegister()); 298 LoadWithVectorDescriptor::VectorRegister());
299 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 299 ExternalReference ref =
300 ExternalReference(Runtime::FunctionForId(Runtime::kLoadIC_Miss), isolate);
300 int arg_count = 4; 301 int arg_count = 4;
301 __ TailCallExternalReference(ref, arg_count, 1); 302 __ TailCallExternalReference(ref, arg_count, 1);
302 } 303 }
303 304
304 305
305 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm, 306 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
306 LanguageMode language_mode) { 307 LanguageMode language_mode) {
307 // The return address is in lr. 308 // The return address is in lr.
308 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); 309 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
309 310
(...skipping 11 matching lines...) Expand all
321 DCHECK(!AreAliased(x10, x11, LoadWithVectorDescriptor::SlotRegister(), 322 DCHECK(!AreAliased(x10, x11, LoadWithVectorDescriptor::SlotRegister(),
322 LoadWithVectorDescriptor::VectorRegister())); 323 LoadWithVectorDescriptor::VectorRegister()));
323 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11); 324 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11);
324 325
325 __ Push(LoadWithVectorDescriptor::ReceiverRegister(), 326 __ Push(LoadWithVectorDescriptor::ReceiverRegister(),
326 LoadWithVectorDescriptor::NameRegister(), 327 LoadWithVectorDescriptor::NameRegister(),
327 LoadWithVectorDescriptor::SlotRegister(), 328 LoadWithVectorDescriptor::SlotRegister(),
328 LoadWithVectorDescriptor::VectorRegister()); 329 LoadWithVectorDescriptor::VectorRegister());
329 330
330 // Perform tail call to the entry. 331 // Perform tail call to the entry.
331 ExternalReference ref = 332 ExternalReference ref = ExternalReference(
332 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 333 Runtime::FunctionForId(Runtime::kKeyedLoadIC_Miss), isolate);
333 int arg_count = 4; 334 int arg_count = 4;
334 __ TailCallExternalReference(ref, arg_count, 1); 335 __ TailCallExternalReference(ref, arg_count, 1);
335 } 336 }
336 337
337 338
338 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm, 339 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm,
339 LanguageMode language_mode) { 340 LanguageMode language_mode) {
340 // The return address is in lr. 341 // The return address is in lr.
341 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); 342 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
342 343
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 } 475 }
475 476
476 477
477 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 478 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
478 ASM_LOCATION("KeyedStoreIC::GenerateMiss"); 479 ASM_LOCATION("KeyedStoreIC::GenerateMiss");
479 480
480 // Push receiver, key and value for runtime call. 481 // Push receiver, key and value for runtime call.
481 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 482 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
482 StoreDescriptor::ValueRegister()); 483 StoreDescriptor::ValueRegister());
483 484
484 ExternalReference ref = 485 ExternalReference ref = ExternalReference(
485 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); 486 Runtime::FunctionForId(Runtime::kKeyedStoreIC_Miss), masm->isolate());
486 __ TailCallExternalReference(ref, 3, 1); 487 __ TailCallExternalReference(ref, 3, 1);
487 } 488 }
488 489
489 490
490 static void KeyedStoreGenerateMegamorphicHelper( 491 static void KeyedStoreGenerateMegamorphicHelper(
491 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, 492 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow,
492 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, 493 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length,
493 Register value, Register key, Register receiver, Register receiver_map, 494 Register value, Register key, Register receiver, Register receiver_map,
494 Register elements_map, Register elements) { 495 Register elements_map, Register elements) {
495 DCHECK(!AreAliased(value, key, receiver, receiver_map, elements_map, elements, 496 DCHECK(!AreAliased(value, key, receiver, receiver_map, elements_map, elements,
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 // Cache miss: Jump to runtime. 768 // Cache miss: Jump to runtime.
768 GenerateMiss(masm); 769 GenerateMiss(masm);
769 } 770 }
770 771
771 772
772 void StoreIC::GenerateMiss(MacroAssembler* masm) { 773 void StoreIC::GenerateMiss(MacroAssembler* masm) {
773 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 774 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
774 StoreDescriptor::ValueRegister()); 775 StoreDescriptor::ValueRegister());
775 776
776 // Tail call to the entry. 777 // Tail call to the entry.
777 ExternalReference ref = 778 ExternalReference ref = ExternalReference(
778 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate()); 779 Runtime::FunctionForId(Runtime::kStoreIC_Miss), masm->isolate());
779 __ TailCallExternalReference(ref, 3, 1); 780 __ TailCallExternalReference(ref, 3, 1);
780 } 781 }
781 782
782 783
783 void StoreIC::GenerateNormal(MacroAssembler* masm) { 784 void StoreIC::GenerateNormal(MacroAssembler* masm) {
784 Label miss; 785 Label miss;
785 Register value = StoreDescriptor::ValueRegister(); 786 Register value = StoreDescriptor::ValueRegister();
786 Register receiver = StoreDescriptor::ReceiverRegister(); 787 Register receiver = StoreDescriptor::ReceiverRegister();
787 Register name = StoreDescriptor::NameRegister(); 788 Register name = StoreDescriptor::NameRegister();
788 Register dictionary = x3; 789 Register dictionary = x3;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 } else { 885 } else {
885 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); 886 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ);
886 // This is JumpIfSmi(smi_reg, branch_imm). 887 // This is JumpIfSmi(smi_reg, branch_imm).
887 patcher.tbz(smi_reg, 0, branch_imm); 888 patcher.tbz(smi_reg, 0, branch_imm);
888 } 889 }
889 } 890 }
890 } // namespace internal 891 } // namespace internal
891 } // namespace v8 892 } // namespace v8
892 893
893 #endif // V8_TARGET_ARCH_ARM64 894 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698