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 #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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 // The return address is in lr. | 306 // The return address is in lr. |
307 Isolate* isolate = masm->isolate(); | 307 Isolate* isolate = masm->isolate(); |
308 | 308 |
309 DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::SlotRegister(), | 309 DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::SlotRegister(), |
310 LoadWithVectorDescriptor::VectorRegister())); | 310 LoadWithVectorDescriptor::VectorRegister())); |
311 __ IncrementCounter(isolate->counters()->load_miss(), 1, r4, r5); | 311 __ IncrementCounter(isolate->counters()->load_miss(), 1, r4, r5); |
312 | 312 |
313 LoadIC_PushArgs(masm); | 313 LoadIC_PushArgs(masm); |
314 | 314 |
315 // Perform tail call to the entry. | 315 // Perform tail call to the entry. |
316 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); | 316 ExternalReference ref = |
| 317 ExternalReference(Runtime::FunctionForId(Runtime::kLoadIC_Miss), isolate); |
317 int arg_count = 4; | 318 int arg_count = 4; |
318 __ TailCallExternalReference(ref, arg_count, 1); | 319 __ TailCallExternalReference(ref, arg_count, 1); |
319 } | 320 } |
320 | 321 |
321 | 322 |
322 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm, | 323 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm, |
323 LanguageMode language_mode) { | 324 LanguageMode language_mode) { |
324 // The return address is in lr. | 325 // The return address is in lr. |
325 | 326 |
326 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister()); | 327 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister()); |
(...skipping 10 matching lines...) Expand all Loading... |
337 // The return address is in lr. | 338 // The return address is in lr. |
338 Isolate* isolate = masm->isolate(); | 339 Isolate* isolate = masm->isolate(); |
339 | 340 |
340 DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::SlotRegister(), | 341 DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::SlotRegister(), |
341 LoadWithVectorDescriptor::VectorRegister())); | 342 LoadWithVectorDescriptor::VectorRegister())); |
342 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r4, r5); | 343 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r4, r5); |
343 | 344 |
344 LoadIC_PushArgs(masm); | 345 LoadIC_PushArgs(masm); |
345 | 346 |
346 // Perform tail call to the entry. | 347 // Perform tail call to the entry. |
347 ExternalReference ref = | 348 ExternalReference ref = ExternalReference( |
348 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); | 349 Runtime::FunctionForId(Runtime::kKeyedLoadIC_Miss), isolate); |
349 int arg_count = 4; | 350 int arg_count = 4; |
350 __ TailCallExternalReference(ref, arg_count, 1); | 351 __ TailCallExternalReference(ref, arg_count, 1); |
351 } | 352 } |
352 | 353 |
353 | 354 |
354 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm, | 355 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm, |
355 LanguageMode language_mode) { | 356 LanguageMode language_mode) { |
356 // The return address is in lr. | 357 // The return address is in lr. |
357 | 358 |
358 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); | 359 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 // Now jump to the place where smi keys are handled. | 466 // Now jump to the place where smi keys are handled. |
466 __ jmp(&index_smi); | 467 __ jmp(&index_smi); |
467 } | 468 } |
468 | 469 |
469 | 470 |
470 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { | 471 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
471 // Push receiver, key and value for runtime call. | 472 // Push receiver, key and value for runtime call. |
472 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), | 473 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), |
473 StoreDescriptor::ValueRegister()); | 474 StoreDescriptor::ValueRegister()); |
474 | 475 |
475 ExternalReference ref = | 476 ExternalReference ref = ExternalReference( |
476 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); | 477 Runtime::FunctionForId(Runtime::kKeyedStoreIC_Miss), masm->isolate()); |
477 __ TailCallExternalReference(ref, 3, 1); | 478 __ TailCallExternalReference(ref, 3, 1); |
478 } | 479 } |
479 | 480 |
480 | 481 |
481 static void KeyedStoreGenerateMegamorphicHelper( | 482 static void KeyedStoreGenerateMegamorphicHelper( |
482 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, | 483 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, |
483 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, | 484 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, |
484 Register value, Register key, Register receiver, Register receiver_map, | 485 Register value, Register key, Register receiver, Register receiver_map, |
485 Register elements_map, Register elements) { | 486 Register elements_map, Register elements) { |
486 Label transition_smi_elements; | 487 Label transition_smi_elements; |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 // Cache miss: Jump to runtime. | 770 // Cache miss: Jump to runtime. |
770 GenerateMiss(masm); | 771 GenerateMiss(masm); |
771 } | 772 } |
772 | 773 |
773 | 774 |
774 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 775 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
775 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), | 776 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), |
776 StoreDescriptor::ValueRegister()); | 777 StoreDescriptor::ValueRegister()); |
777 | 778 |
778 // Perform tail call to the entry. | 779 // Perform tail call to the entry. |
779 ExternalReference ref = | 780 ExternalReference ref = ExternalReference( |
780 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate()); | 781 Runtime::FunctionForId(Runtime::kStoreIC_Miss), masm->isolate()); |
781 __ TailCallExternalReference(ref, 3, 1); | 782 __ TailCallExternalReference(ref, 3, 1); |
782 } | 783 } |
783 | 784 |
784 | 785 |
785 void StoreIC::GenerateNormal(MacroAssembler* masm) { | 786 void StoreIC::GenerateNormal(MacroAssembler* masm) { |
786 Label miss; | 787 Label miss; |
787 Register receiver = StoreDescriptor::ReceiverRegister(); | 788 Register receiver = StoreDescriptor::ReceiverRegister(); |
788 Register name = StoreDescriptor::NameRegister(); | 789 Register name = StoreDescriptor::NameRegister(); |
789 Register value = StoreDescriptor::ValueRegister(); | 790 Register value = StoreDescriptor::ValueRegister(); |
790 Register dictionary = r3; | 791 Register dictionary = r3; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 patcher.EmitCondition(ne); | 897 patcher.EmitCondition(ne); |
897 } else { | 898 } else { |
898 DCHECK(Assembler::GetCondition(branch_instr) == ne); | 899 DCHECK(Assembler::GetCondition(branch_instr) == ne); |
899 patcher.EmitCondition(eq); | 900 patcher.EmitCondition(eq); |
900 } | 901 } |
901 } | 902 } |
902 } // namespace internal | 903 } // namespace internal |
903 } // namespace v8 | 904 } // namespace v8 |
904 | 905 |
905 #endif // V8_TARGET_ARCH_ARM | 906 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |