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

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

Issue 767743002: Hydrogen code stubs for vector-based ICs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 6 years 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/arm64/handler-compiler-arm64.cc ('k') | src/ic/arm64/ic-compiler-arm64.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 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 __ Bind(&slow); 347 __ Bind(&slow);
348 GenerateRuntimeGetProperty(masm); 348 GenerateRuntimeGetProperty(masm);
349 } 349 }
350 350
351 351
352 void LoadIC::GenerateMiss(MacroAssembler* masm) { 352 void LoadIC::GenerateMiss(MacroAssembler* masm) {
353 // The return address is in lr. 353 // The return address is in lr.
354 Isolate* isolate = masm->isolate(); 354 Isolate* isolate = masm->isolate();
355 ASM_LOCATION("LoadIC::GenerateMiss"); 355 ASM_LOCATION("LoadIC::GenerateMiss");
356 356
357 __ IncrementCounter(isolate->counters()->load_miss(), 1, x3, x4); 357 DCHECK(!FLAG_vector_ics ||
358 !AreAliased(x4, x5, VectorLoadICDescriptor::SlotRegister(),
359 VectorLoadICDescriptor::VectorRegister()));
360 __ IncrementCounter(isolate->counters()->load_miss(), 1, x4, x5);
358 361
359 // Perform tail call to the entry. 362 // Perform tail call to the entry.
360 if (FLAG_vector_ics) { 363 if (FLAG_vector_ics) {
361 __ Push(VectorLoadICDescriptor::ReceiverRegister(), 364 __ Push(VectorLoadICDescriptor::ReceiverRegister(),
362 VectorLoadICDescriptor::NameRegister(), 365 VectorLoadICDescriptor::NameRegister(),
363 VectorLoadICDescriptor::SlotRegister(), 366 VectorLoadICDescriptor::SlotRegister(),
364 VectorLoadICDescriptor::VectorRegister()); 367 VectorLoadICDescriptor::VectorRegister());
365 } else { 368 } else {
366 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); 369 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
367 } 370 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 __ Ret(); 424 __ Ret();
422 __ Bind(&slow); 425 __ Bind(&slow);
423 GenerateMiss(masm); 426 GenerateMiss(masm);
424 } 427 }
425 428
426 429
427 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 430 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
428 // The return address is in lr. 431 // The return address is in lr.
429 Isolate* isolate = masm->isolate(); 432 Isolate* isolate = masm->isolate();
430 433
434 DCHECK(!FLAG_vector_ics ||
435 !AreAliased(x10, x11, VectorLoadICDescriptor::SlotRegister(),
436 VectorLoadICDescriptor::VectorRegister()));
431 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11); 437 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11);
432 438
433 if (FLAG_vector_ics) { 439 if (FLAG_vector_ics) {
434 __ Push(VectorLoadICDescriptor::ReceiverRegister(), 440 __ Push(VectorLoadICDescriptor::ReceiverRegister(),
435 VectorLoadICDescriptor::NameRegister(), 441 VectorLoadICDescriptor::NameRegister(),
436 VectorLoadICDescriptor::SlotRegister(), 442 VectorLoadICDescriptor::SlotRegister(),
437 VectorLoadICDescriptor::VectorRegister()); 443 VectorLoadICDescriptor::VectorRegister());
438 } else { 444 } else {
439 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); 445 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
440 } 446 }
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 // x2: receiver 851 // x2: receiver
846 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); 852 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode);
847 // Never returns to here. 853 // Never returns to here.
848 854
849 __ bind(&maybe_name_key); 855 __ bind(&maybe_name_key);
850 __ Ldr(x10, FieldMemOperand(key, HeapObject::kMapOffset)); 856 __ Ldr(x10, FieldMemOperand(key, HeapObject::kMapOffset));
851 __ Ldrb(x10, FieldMemOperand(x10, Map::kInstanceTypeOffset)); 857 __ Ldrb(x10, FieldMemOperand(x10, Map::kInstanceTypeOffset));
852 __ JumpIfNotUniqueNameInstanceType(x10, &slow); 858 __ JumpIfNotUniqueNameInstanceType(x10, &slow);
853 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 859 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
854 Code::ComputeHandlerFlags(Code::STORE_IC)); 860 Code::ComputeHandlerFlags(Code::STORE_IC));
855 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver, 861 masm->isolate()->stub_cache()->GenerateProbe(
856 key, x3, x4, x5, x6); 862 masm, Code::STORE_IC, flags, false, receiver, key, x3, x4, x5, x6);
857 // Cache miss. 863 // Cache miss.
858 __ B(&miss); 864 __ B(&miss);
859 865
860 __ Bind(&extra); 866 __ Bind(&extra);
861 // Extra capacity case: Check if there is extra capacity to 867 // Extra capacity case: Check if there is extra capacity to
862 // perform the store and update the length. Used for adding one 868 // perform the store and update the length. Used for adding one
863 // element to the array by writing to array[array.length]. 869 // element to the array by writing to array[array.length].
864 870
865 // Check for room in the elements backing store. 871 // Check for room in the elements backing store.
866 // Both the key and the length of FixedArray are smis. 872 // Both the key and the length of FixedArray are smis.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 911
906 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 912 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
907 Register receiver = StoreDescriptor::ReceiverRegister(); 913 Register receiver = StoreDescriptor::ReceiverRegister();
908 Register name = StoreDescriptor::NameRegister(); 914 Register name = StoreDescriptor::NameRegister();
909 DCHECK(!AreAliased(receiver, name, StoreDescriptor::ValueRegister(), x3, x4, 915 DCHECK(!AreAliased(receiver, name, StoreDescriptor::ValueRegister(), x3, x4,
910 x5, x6)); 916 x5, x6));
911 917
912 // Probe the stub cache. 918 // Probe the stub cache.
913 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 919 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
914 Code::ComputeHandlerFlags(Code::STORE_IC)); 920 Code::ComputeHandlerFlags(Code::STORE_IC));
915 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver, 921 masm->isolate()->stub_cache()->GenerateProbe(
916 name, x3, x4, x5, x6); 922 masm, Code::STORE_IC, flags, false, receiver, name, x3, x4, x5, x6);
917 923
918 // Cache miss: Jump to runtime. 924 // Cache miss: Jump to runtime.
919 GenerateMiss(masm); 925 GenerateMiss(masm);
920 } 926 }
921 927
922 928
923 void StoreIC::GenerateMiss(MacroAssembler* masm) { 929 void StoreIC::GenerateMiss(MacroAssembler* masm) {
924 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 930 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
925 StoreDescriptor::ValueRegister()); 931 StoreDescriptor::ValueRegister());
926 932
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 } else { 1041 } else {
1036 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); 1042 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ);
1037 // This is JumpIfSmi(smi_reg, branch_imm). 1043 // This is JumpIfSmi(smi_reg, branch_imm).
1038 patcher.tbz(smi_reg, 0, branch_imm); 1044 patcher.tbz(smi_reg, 0, branch_imm);
1039 } 1045 }
1040 } 1046 }
1041 } 1047 }
1042 } // namespace v8::internal 1048 } // namespace v8::internal
1043 1049
1044 #endif // V8_TARGET_ARCH_ARM64 1050 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/ic/arm64/handler-compiler-arm64.cc ('k') | src/ic/arm64/ic-compiler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698