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/arm/ic-arm.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/arm/handler-compiler-arm.cc ('k') | src/ic/arm/ic-compiler-arm.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } else { 276 } else {
277 __ Push(receiver, name); 277 __ Push(receiver, name);
278 } 278 }
279 } 279 }
280 280
281 281
282 void LoadIC::GenerateMiss(MacroAssembler* masm) { 282 void LoadIC::GenerateMiss(MacroAssembler* masm) {
283 // The return address is in lr. 283 // The return address is in lr.
284 Isolate* isolate = masm->isolate(); 284 Isolate* isolate = masm->isolate();
285 285
286 __ IncrementCounter(isolate->counters()->load_miss(), 1, r3, r4); 286 DCHECK(!FLAG_vector_ics ||
287 !AreAliased(r4, r5, VectorLoadICDescriptor::SlotRegister(),
288 VectorLoadICDescriptor::VectorRegister()));
289 __ IncrementCounter(isolate->counters()->load_miss(), 1, r4, r5);
287 290
288 LoadIC_PushArgs(masm); 291 LoadIC_PushArgs(masm);
289 292
290 // Perform tail call to the entry. 293 // Perform tail call to the entry.
291 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 294 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
292 int arg_count = FLAG_vector_ics ? 4 : 2; 295 int arg_count = FLAG_vector_ics ? 4 : 2;
293 __ TailCallExternalReference(ref, arg_count, 1); 296 __ TailCallExternalReference(ref, arg_count, 1);
294 } 297 }
295 298
296 299
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 __ Ret(); 413 __ Ret();
411 __ bind(&slow); 414 __ bind(&slow);
412 GenerateMiss(masm); 415 GenerateMiss(masm);
413 } 416 }
414 417
415 418
416 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 419 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
417 // The return address is in lr. 420 // The return address is in lr.
418 Isolate* isolate = masm->isolate(); 421 Isolate* isolate = masm->isolate();
419 422
420 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r3, r4); 423 DCHECK(!FLAG_vector_ics ||
424 !AreAliased(r4, r5, VectorLoadICDescriptor::SlotRegister(),
425 VectorLoadICDescriptor::VectorRegister()));
426 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r4, r5);
421 427
422 LoadIC_PushArgs(masm); 428 LoadIC_PushArgs(masm);
423 429
424 // Perform tail call to the entry. 430 // Perform tail call to the entry.
425 ExternalReference ref = 431 ExternalReference ref =
426 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 432 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
427 int arg_count = FLAG_vector_ics ? 4 : 2; 433 int arg_count = FLAG_vector_ics ? 4 : 2;
428 __ TailCallExternalReference(ref, arg_count, 1); 434 __ TailCallExternalReference(ref, arg_count, 1);
429 } 435 }
430 436
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 // r2: receiver. 817 // r2: receiver.
812 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); 818 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode);
813 // Never returns to here. 819 // Never returns to here.
814 820
815 __ bind(&maybe_name_key); 821 __ bind(&maybe_name_key);
816 __ ldr(r4, FieldMemOperand(key, HeapObject::kMapOffset)); 822 __ ldr(r4, FieldMemOperand(key, HeapObject::kMapOffset));
817 __ ldrb(r4, FieldMemOperand(r4, Map::kInstanceTypeOffset)); 823 __ ldrb(r4, FieldMemOperand(r4, Map::kInstanceTypeOffset));
818 __ JumpIfNotUniqueNameInstanceType(r4, &slow); 824 __ JumpIfNotUniqueNameInstanceType(r4, &slow);
819 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 825 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
820 Code::ComputeHandlerFlags(Code::STORE_IC)); 826 Code::ComputeHandlerFlags(Code::STORE_IC));
821 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver, 827 masm->isolate()->stub_cache()->GenerateProbe(
822 key, r3, r4, r5, r6); 828 masm, Code::STORE_IC, flags, false, receiver, key, r3, r4, r5, r6);
823 // Cache miss. 829 // Cache miss.
824 __ b(&miss); 830 __ b(&miss);
825 831
826 // Extra capacity case: Check if there is extra capacity to 832 // Extra capacity case: Check if there is extra capacity to
827 // perform the store and update the length. Used for adding one 833 // perform the store and update the length. Used for adding one
828 // element to the array by writing to array[array.length]. 834 // element to the array by writing to array[array.length].
829 __ bind(&extra); 835 __ bind(&extra);
830 // Condition code from comparing key and array length is still available. 836 // Condition code from comparing key and array length is still available.
831 __ b(ne, &slow); // Only support writing to writing to array[array.length]. 837 __ b(ne, &slow); // Only support writing to writing to array[array.length].
832 // Check for room in the elements backing store. 838 // Check for room in the elements backing store.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 Register receiver = StoreDescriptor::ReceiverRegister(); 879 Register receiver = StoreDescriptor::ReceiverRegister();
874 Register name = StoreDescriptor::NameRegister(); 880 Register name = StoreDescriptor::NameRegister();
875 DCHECK(receiver.is(r1)); 881 DCHECK(receiver.is(r1));
876 DCHECK(name.is(r2)); 882 DCHECK(name.is(r2));
877 DCHECK(StoreDescriptor::ValueRegister().is(r0)); 883 DCHECK(StoreDescriptor::ValueRegister().is(r0));
878 884
879 // Get the receiver from the stack and probe the stub cache. 885 // Get the receiver from the stack and probe the stub cache.
880 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 886 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
881 Code::ComputeHandlerFlags(Code::STORE_IC)); 887 Code::ComputeHandlerFlags(Code::STORE_IC));
882 888
883 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver, 889 masm->isolate()->stub_cache()->GenerateProbe(
884 name, r3, r4, r5, r6); 890 masm, Code::STORE_IC, flags, false, receiver, name, r3, r4, r5, r6);
885 891
886 // Cache miss: Jump to runtime. 892 // Cache miss: Jump to runtime.
887 GenerateMiss(masm); 893 GenerateMiss(masm);
888 } 894 }
889 895
890 896
891 void StoreIC::GenerateMiss(MacroAssembler* masm) { 897 void StoreIC::GenerateMiss(MacroAssembler* masm) {
892 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 898 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
893 StoreDescriptor::ValueRegister()); 899 StoreDescriptor::ValueRegister());
894 900
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 patcher.EmitCondition(ne); 1019 patcher.EmitCondition(ne);
1014 } else { 1020 } else {
1015 DCHECK(Assembler::GetCondition(branch_instr) == ne); 1021 DCHECK(Assembler::GetCondition(branch_instr) == ne);
1016 patcher.EmitCondition(eq); 1022 patcher.EmitCondition(eq);
1017 } 1023 }
1018 } 1024 }
1019 } 1025 }
1020 } // namespace v8::internal 1026 } // namespace v8::internal
1021 1027
1022 #endif // V8_TARGET_ARCH_ARM 1028 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/arm/ic-compiler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698