OLD | NEW |
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_MIPS64 | 8 #if V8_TARGET_ARCH_MIPS64 |
9 | 9 |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 } else { | 281 } else { |
282 __ Push(receiver, name); | 282 __ Push(receiver, name); |
283 } | 283 } |
284 } | 284 } |
285 | 285 |
286 | 286 |
287 void LoadIC::GenerateMiss(MacroAssembler* masm) { | 287 void LoadIC::GenerateMiss(MacroAssembler* masm) { |
288 // The return address is on the stack. | 288 // The return address is on the stack. |
289 Isolate* isolate = masm->isolate(); | 289 Isolate* isolate = masm->isolate(); |
290 | 290 |
291 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4); | 291 DCHECK(!FLAG_vector_ics || |
| 292 !AreAliased(a4, a5, VectorLoadICDescriptor::SlotRegister(), |
| 293 VectorLoadICDescriptor::VectorRegister())); |
| 294 __ IncrementCounter(isolate->counters()->load_miss(), 1, a4, a5); |
292 | 295 |
293 LoadIC_PushArgs(masm); | 296 LoadIC_PushArgs(masm); |
294 | 297 |
295 // Perform tail call to the entry. | 298 // Perform tail call to the entry. |
296 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); | 299 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); |
297 int arg_count = FLAG_vector_ics ? 4 : 2; | 300 int arg_count = FLAG_vector_ics ? 4 : 2; |
298 __ TailCallExternalReference(ref, arg_count, 1); | 301 __ TailCallExternalReference(ref, arg_count, 1); |
299 } | 302 } |
300 | 303 |
301 | 304 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 __ mov(v0, a0); // (In delay slot) return the value stored in v0. | 420 __ mov(v0, a0); // (In delay slot) return the value stored in v0. |
418 __ bind(&slow); | 421 __ bind(&slow); |
419 GenerateMiss(masm); | 422 GenerateMiss(masm); |
420 } | 423 } |
421 | 424 |
422 | 425 |
423 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { | 426 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
424 // The return address is in ra. | 427 // The return address is in ra. |
425 Isolate* isolate = masm->isolate(); | 428 Isolate* isolate = masm->isolate(); |
426 | 429 |
427 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4); | 430 DCHECK(!FLAG_vector_ics || |
| 431 !AreAliased(a4, a5, VectorLoadICDescriptor::SlotRegister(), |
| 432 VectorLoadICDescriptor::VectorRegister())); |
| 433 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a4, a5); |
428 | 434 |
429 LoadIC_PushArgs(masm); | 435 LoadIC_PushArgs(masm); |
430 | 436 |
431 // Perform tail call to the entry. | 437 // Perform tail call to the entry. |
432 ExternalReference ref = | 438 ExternalReference ref = |
433 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); | 439 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); |
434 | 440 |
435 int arg_count = FLAG_vector_ics ? 4 : 2; | 441 int arg_count = FLAG_vector_ics ? 4 : 2; |
436 __ TailCallExternalReference(ref, arg_count, 1); | 442 __ TailCallExternalReference(ref, arg_count, 1); |
437 } | 443 } |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 // a2: receiver. | 824 // a2: receiver. |
819 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); | 825 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); |
820 // Never returns to here. | 826 // Never returns to here. |
821 | 827 |
822 __ bind(&maybe_name_key); | 828 __ bind(&maybe_name_key); |
823 __ ld(a4, FieldMemOperand(key, HeapObject::kMapOffset)); | 829 __ ld(a4, FieldMemOperand(key, HeapObject::kMapOffset)); |
824 __ lb(a4, FieldMemOperand(a4, Map::kInstanceTypeOffset)); | 830 __ lb(a4, FieldMemOperand(a4, Map::kInstanceTypeOffset)); |
825 __ JumpIfNotUniqueNameInstanceType(a4, &slow); | 831 __ JumpIfNotUniqueNameInstanceType(a4, &slow); |
826 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 832 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
827 Code::ComputeHandlerFlags(Code::STORE_IC)); | 833 Code::ComputeHandlerFlags(Code::STORE_IC)); |
828 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver, | 834 masm->isolate()->stub_cache()->GenerateProbe( |
829 key, a3, a4, a5, a6); | 835 masm, Code::STORE_IC, flags, false, receiver, key, a3, a4, a5, a6); |
830 // Cache miss. | 836 // Cache miss. |
831 __ Branch(&miss); | 837 __ Branch(&miss); |
832 | 838 |
833 // Extra capacity case: Check if there is extra capacity to | 839 // Extra capacity case: Check if there is extra capacity to |
834 // perform the store and update the length. Used for adding one | 840 // perform the store and update the length. Used for adding one |
835 // element to the array by writing to array[array.length]. | 841 // element to the array by writing to array[array.length]. |
836 __ bind(&extra); | 842 __ bind(&extra); |
837 // Condition code from comparing key and array length is still available. | 843 // Condition code from comparing key and array length is still available. |
838 // Only support writing to array[array.length]. | 844 // Only support writing to array[array.length]. |
839 __ Branch(&slow, ne, key, Operand(a4)); | 845 __ Branch(&slow, ne, key, Operand(a4)); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 894 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
889 Register receiver = StoreDescriptor::ReceiverRegister(); | 895 Register receiver = StoreDescriptor::ReceiverRegister(); |
890 Register name = StoreDescriptor::NameRegister(); | 896 Register name = StoreDescriptor::NameRegister(); |
891 DCHECK(receiver.is(a1)); | 897 DCHECK(receiver.is(a1)); |
892 DCHECK(name.is(a2)); | 898 DCHECK(name.is(a2)); |
893 DCHECK(StoreDescriptor::ValueRegister().is(a0)); | 899 DCHECK(StoreDescriptor::ValueRegister().is(a0)); |
894 | 900 |
895 // Get the receiver from the stack and probe the stub cache. | 901 // Get the receiver from the stack and probe the stub cache. |
896 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 902 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
897 Code::ComputeHandlerFlags(Code::STORE_IC)); | 903 Code::ComputeHandlerFlags(Code::STORE_IC)); |
898 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, false, receiver, | 904 masm->isolate()->stub_cache()->GenerateProbe( |
899 name, a3, a4, a5, a6); | 905 masm, Code::STORE_IC, flags, false, receiver, name, a3, a4, a5, a6); |
900 | 906 |
901 // Cache miss: Jump to runtime. | 907 // Cache miss: Jump to runtime. |
902 GenerateMiss(masm); | 908 GenerateMiss(masm); |
903 } | 909 } |
904 | 910 |
905 | 911 |
906 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 912 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
907 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), | 913 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), |
908 StoreDescriptor::ValueRegister()); | 914 StoreDescriptor::ValueRegister()); |
909 // Perform tail call to the entry. | 915 // Perform tail call to the entry. |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 patcher.ChangeBranchCondition(ne); | 1032 patcher.ChangeBranchCondition(ne); |
1027 } else { | 1033 } else { |
1028 DCHECK(Assembler::IsBne(branch_instr)); | 1034 DCHECK(Assembler::IsBne(branch_instr)); |
1029 patcher.ChangeBranchCondition(eq); | 1035 patcher.ChangeBranchCondition(eq); |
1030 } | 1036 } |
1031 } | 1037 } |
1032 } | 1038 } |
1033 } // namespace v8::internal | 1039 } // namespace v8::internal |
1034 | 1040 |
1035 #endif // V8_TARGET_ARCH_MIPS64 | 1041 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |