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/mips/ic-mips.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/mips/ic-compiler-mips.cc ('k') | src/ic/mips/stub-cache-mips.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 5
6 #include "src/v8.h" 6 #include "src/v8.h"
7 7
8 #if V8_TARGET_ARCH_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } else { 283 } else {
284 __ Push(receiver, name); 284 __ Push(receiver, name);
285 } 285 }
286 } 286 }
287 287
288 288
289 void LoadIC::GenerateMiss(MacroAssembler* masm) { 289 void LoadIC::GenerateMiss(MacroAssembler* masm) {
290 // The return address is in ra. 290 // The return address is in ra.
291 Isolate* isolate = masm->isolate(); 291 Isolate* isolate = masm->isolate();
292 292
293 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0); 293 DCHECK(!FLAG_vector_ics ||
294 !AreAliased(t0, t1, VectorLoadICDescriptor::SlotRegister(),
295 VectorLoadICDescriptor::VectorRegister()));
296 __ IncrementCounter(isolate->counters()->load_miss(), 1, t0, t1);
294 297
295 LoadIC_PushArgs(masm); 298 LoadIC_PushArgs(masm);
296 299
297 // Perform tail call to the entry. 300 // Perform tail call to the entry.
298 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 301 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
299 int arg_count = FLAG_vector_ics ? 4 : 2; 302 int arg_count = FLAG_vector_ics ? 4 : 2;
300 __ TailCallExternalReference(ref, arg_count, 1); 303 __ TailCallExternalReference(ref, arg_count, 1);
301 } 304 }
302 305
303 306
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 __ mov(v0, a0); // (In delay slot) return the value stored in v0. 422 __ mov(v0, a0); // (In delay slot) return the value stored in v0.
420 __ bind(&slow); 423 __ bind(&slow);
421 GenerateMiss(masm); 424 GenerateMiss(masm);
422 } 425 }
423 426
424 427
425 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 428 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
426 // The return address is in ra. 429 // The return address is in ra.
427 Isolate* isolate = masm->isolate(); 430 Isolate* isolate = masm->isolate();
428 431
429 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0); 432 DCHECK(!FLAG_vector_ics ||
433 !AreAliased(t0, t1, VectorLoadICDescriptor::SlotRegister(),
434 VectorLoadICDescriptor::VectorRegister()));
435 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, t0, t1);
430 436
431 LoadIC_PushArgs(masm); 437 LoadIC_PushArgs(masm);
432 438
433 // Perform tail call to the entry. 439 // Perform tail call to the entry.
434 ExternalReference ref = 440 ExternalReference ref =
435 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 441 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
436 442
437 int arg_count = FLAG_vector_ics ? 4 : 2; 443 int arg_count = FLAG_vector_ics ? 4 : 2;
438 __ TailCallExternalReference(ref, arg_count, 1); 444 __ TailCallExternalReference(ref, arg_count, 1);
439 } 445 }
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 // a2: receiver. 815 // a2: receiver.
810 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); 816 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode);
811 // Never returns to here. 817 // Never returns to here.
812 818
813 __ bind(&maybe_name_key); 819 __ bind(&maybe_name_key);
814 __ lw(t0, FieldMemOperand(key, HeapObject::kMapOffset)); 820 __ lw(t0, FieldMemOperand(key, HeapObject::kMapOffset));
815 __ lb(t0, FieldMemOperand(t0, Map::kInstanceTypeOffset)); 821 __ lb(t0, FieldMemOperand(t0, Map::kInstanceTypeOffset));
816 __ JumpIfNotUniqueNameInstanceType(t0, &slow); 822 __ JumpIfNotUniqueNameInstanceType(t0, &slow);
817 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 823 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
818 Code::ComputeHandlerFlags(Code::STORE_IC)); 824 Code::ComputeHandlerFlags(Code::STORE_IC));
819 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver, 825 masm->isolate()->stub_cache()->GenerateProbe(
820 key, a3, t0, t1, t2); 826 masm, Code::STORE_IC, flags, false, receiver, key, a3, t0, t1, t2);
821 // Cache miss. 827 // Cache miss.
822 __ Branch(&miss); 828 __ Branch(&miss);
823 829
824 // Extra capacity case: Check if there is extra capacity to 830 // Extra capacity case: Check if there is extra capacity to
825 // perform the store and update the length. Used for adding one 831 // perform the store and update the length. Used for adding one
826 // element to the array by writing to array[array.length]. 832 // element to the array by writing to array[array.length].
827 __ bind(&extra); 833 __ bind(&extra);
828 // Condition code from comparing key and array length is still available. 834 // Condition code from comparing key and array length is still available.
829 // Only support writing to array[array.length]. 835 // Only support writing to array[array.length].
830 __ Branch(&slow, ne, key, Operand(t0)); 836 __ Branch(&slow, ne, key, Operand(t0));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 885 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
880 Register receiver = StoreDescriptor::ReceiverRegister(); 886 Register receiver = StoreDescriptor::ReceiverRegister();
881 Register name = StoreDescriptor::NameRegister(); 887 Register name = StoreDescriptor::NameRegister();
882 DCHECK(receiver.is(a1)); 888 DCHECK(receiver.is(a1));
883 DCHECK(name.is(a2)); 889 DCHECK(name.is(a2));
884 DCHECK(StoreDescriptor::ValueRegister().is(a0)); 890 DCHECK(StoreDescriptor::ValueRegister().is(a0));
885 891
886 // Get the receiver from the stack and probe the stub cache. 892 // Get the receiver from the stack and probe the stub cache.
887 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 893 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
888 Code::ComputeHandlerFlags(Code::STORE_IC)); 894 Code::ComputeHandlerFlags(Code::STORE_IC));
889 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver, 895 masm->isolate()->stub_cache()->GenerateProbe(
890 name, a3, t0, t1, t2); 896 masm, Code::STORE_IC, flags, false, receiver, name, a3, t0, t1, t2);
891 897
892 // Cache miss: Jump to runtime. 898 // Cache miss: Jump to runtime.
893 GenerateMiss(masm); 899 GenerateMiss(masm);
894 } 900 }
895 901
896 902
897 void StoreIC::GenerateMiss(MacroAssembler* masm) { 903 void StoreIC::GenerateMiss(MacroAssembler* masm) {
898 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 904 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
899 StoreDescriptor::ValueRegister()); 905 StoreDescriptor::ValueRegister());
900 // Perform tail call to the entry. 906 // Perform tail call to the entry.
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 patcher.ChangeBranchCondition(ne); 1025 patcher.ChangeBranchCondition(ne);
1020 } else { 1026 } else {
1021 DCHECK(Assembler::IsBne(branch_instr)); 1027 DCHECK(Assembler::IsBne(branch_instr));
1022 patcher.ChangeBranchCondition(eq); 1028 patcher.ChangeBranchCondition(eq);
1023 } 1029 }
1024 } 1030 }
1025 } 1031 }
1026 } // namespace v8::internal 1032 } // namespace v8::internal
1027 1033
1028 #endif // V8_TARGET_ARCH_MIPS 1034 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/mips/ic-compiler-mips.cc ('k') | src/ic/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698