| 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
| 9 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
| 10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 __ PopReturnAddressTo(rbx); | 699 __ PopReturnAddressTo(rbx); |
| 700 __ Push(receiver); | 700 __ Push(receiver); |
| 701 __ Push(name); | 701 __ Push(name); |
| 702 __ PushReturnAddressFrom(rbx); | 702 __ PushReturnAddressFrom(rbx); |
| 703 | 703 |
| 704 // Do tail-call to runtime routine. | 704 // Do tail-call to runtime routine. |
| 705 __ TailCallRuntime(Runtime::kKeyedGetProperty); | 705 __ TailCallRuntime(Runtime::kKeyedGetProperty); |
| 706 } | 706 } |
| 707 | 707 |
| 708 static void StoreIC_PushArgs(MacroAssembler* masm) { | 708 static void StoreIC_PushArgs(MacroAssembler* masm) { |
| 709 Register receiver = StoreDescriptor::ReceiverRegister(); | 709 Register receiver = StoreWithVectorDescriptor::ReceiverRegister(); |
| 710 Register name = StoreDescriptor::NameRegister(); | 710 Register name = StoreWithVectorDescriptor::NameRegister(); |
| 711 Register value = StoreDescriptor::ValueRegister(); | 711 Register value = StoreWithVectorDescriptor::ValueRegister(); |
| 712 Register slot = StoreWithVectorDescriptor::SlotRegister(); |
| 713 Register vector = StoreWithVectorDescriptor::VectorRegister(); |
| 712 Register temp = r11; | 714 Register temp = r11; |
| 713 DCHECK(!temp.is(receiver) && !temp.is(name) && !temp.is(value)); | 715 DCHECK(!AreAliased(receiver, name, value, slot, vector, temp)); |
| 714 | 716 |
| 715 __ PopReturnAddressTo(temp); | 717 __ PopReturnAddressTo(temp); |
| 718 __ Push(value); |
| 719 __ Push(slot); |
| 720 __ Push(vector); |
| 716 __ Push(receiver); | 721 __ Push(receiver); |
| 717 __ Push(name); | 722 __ Push(name); |
| 718 __ Push(value); | |
| 719 Register slot = StoreWithVectorDescriptor::SlotRegister(); | |
| 720 Register vector = StoreWithVectorDescriptor::VectorRegister(); | |
| 721 DCHECK(!temp.is(slot) && !temp.is(vector)); | |
| 722 __ Push(slot); | |
| 723 __ Push(vector); | |
| 724 __ PushReturnAddressFrom(temp); | 723 __ PushReturnAddressFrom(temp); |
| 725 } | 724 } |
| 726 | 725 |
| 727 | 726 |
| 728 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 727 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| 729 // Return address is on the stack. | 728 // Return address is on the stack. |
| 730 StoreIC_PushArgs(masm); | 729 StoreIC_PushArgs(masm); |
| 731 | 730 |
| 732 // Perform tail call to the entry. | 731 // Perform tail call to the entry. |
| 733 __ TailCallRuntime(Runtime::kStoreIC_Miss); | 732 __ TailCallRuntime(Runtime::kStoreIC_Miss); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 Condition cc = | 840 Condition cc = |
| 842 (check == ENABLE_INLINED_SMI_CHECK) | 841 (check == ENABLE_INLINED_SMI_CHECK) |
| 843 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 842 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
| 844 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 843 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
| 845 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 844 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 846 } | 845 } |
| 847 } // namespace internal | 846 } // namespace internal |
| 848 } // namespace v8 | 847 } // namespace v8 |
| 849 | 848 |
| 850 #endif // V8_TARGET_ARCH_X64 | 849 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |