| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 | 768 |
| 769 // Push receiver, key and value for runtime call. | 769 // Push receiver, key and value for runtime call. |
| 770 __ Push(ReceiverRegister(), NameRegister(), ValueRegister()); | 770 __ Push(ReceiverRegister(), NameRegister(), ValueRegister()); |
| 771 | 771 |
| 772 ExternalReference ref = | 772 ExternalReference ref = |
| 773 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); | 773 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); |
| 774 __ TailCallExternalReference(ref, 3, 1); | 774 __ TailCallExternalReference(ref, 3, 1); |
| 775 } | 775 } |
| 776 | 776 |
| 777 | 777 |
| 778 void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) { | |
| 779 ASM_LOCATION("KeyedStoreIC::GenerateSlow"); | |
| 780 | |
| 781 // Push receiver, key and value for runtime call. | |
| 782 __ Push(ReceiverRegister(), NameRegister(), ValueRegister()); | |
| 783 | |
| 784 // The slow case calls into the runtime to complete the store without causing | |
| 785 // an IC miss that would otherwise cause a transition to the generic stub. | |
| 786 ExternalReference ref = | |
| 787 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); | |
| 788 __ TailCallExternalReference(ref, 3, 1); | |
| 789 } | |
| 790 | |
| 791 | |
| 792 static void KeyedStoreGenerateGenericHelper( | 778 static void KeyedStoreGenerateGenericHelper( |
| 793 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, | 779 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, |
| 794 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, | 780 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, |
| 795 Register value, Register key, Register receiver, Register receiver_map, | 781 Register value, Register key, Register receiver, Register receiver_map, |
| 796 Register elements_map, Register elements) { | 782 Register elements_map, Register elements) { |
| 797 DCHECK(!AreAliased(value, key, receiver, receiver_map, elements_map, elements, | 783 DCHECK(!AreAliased(value, key, receiver, receiver_map, elements_map, elements, |
| 798 x10, x11)); | 784 x10, x11)); |
| 799 | 785 |
| 800 Label transition_smi_elements; | 786 Label transition_smi_elements; |
| 801 Label transition_double_elements; | 787 Label transition_double_elements; |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 __ IncrementCounter(counters->store_normal_hit(), 1, x4, x5); | 1048 __ IncrementCounter(counters->store_normal_hit(), 1, x4, x5); |
| 1063 __ Ret(); | 1049 __ Ret(); |
| 1064 | 1050 |
| 1065 // Cache miss: Jump to runtime. | 1051 // Cache miss: Jump to runtime. |
| 1066 __ Bind(&miss); | 1052 __ Bind(&miss); |
| 1067 __ IncrementCounter(counters->store_normal_miss(), 1, x4, x5); | 1053 __ IncrementCounter(counters->store_normal_miss(), 1, x4, x5); |
| 1068 GenerateMiss(masm); | 1054 GenerateMiss(masm); |
| 1069 } | 1055 } |
| 1070 | 1056 |
| 1071 | 1057 |
| 1072 void StoreIC::GenerateSlow(MacroAssembler* masm) { | |
| 1073 // ---------- S t a t e -------------- | |
| 1074 // -- x0 : value | |
| 1075 // -- x1 : receiver | |
| 1076 // -- x2 : name | |
| 1077 // -- lr : return address | |
| 1078 // ----------------------------------- | |
| 1079 | |
| 1080 // Push receiver, name and value for runtime call. | |
| 1081 __ Push(ReceiverRegister(), NameRegister(), ValueRegister()); | |
| 1082 | |
| 1083 // The slow case calls into the runtime to complete the store without causing | |
| 1084 // an IC miss that would otherwise cause a transition to the generic stub. | |
| 1085 ExternalReference ref = | |
| 1086 ExternalReference(IC_Utility(kStoreIC_Slow), masm->isolate()); | |
| 1087 __ TailCallExternalReference(ref, 3, 1); | |
| 1088 } | |
| 1089 | |
| 1090 | |
| 1091 Condition CompareIC::ComputeCondition(Token::Value op) { | 1058 Condition CompareIC::ComputeCondition(Token::Value op) { |
| 1092 switch (op) { | 1059 switch (op) { |
| 1093 case Token::EQ_STRICT: | 1060 case Token::EQ_STRICT: |
| 1094 case Token::EQ: | 1061 case Token::EQ: |
| 1095 return eq; | 1062 return eq; |
| 1096 case Token::LT: | 1063 case Token::LT: |
| 1097 return lt; | 1064 return lt; |
| 1098 case Token::GT: | 1065 case Token::GT: |
| 1099 return gt; | 1066 return gt; |
| 1100 case Token::LTE: | 1067 case Token::LTE: |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 } else { | 1137 } else { |
| 1171 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); | 1138 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); |
| 1172 // This is JumpIfSmi(smi_reg, branch_imm). | 1139 // This is JumpIfSmi(smi_reg, branch_imm). |
| 1173 patcher.tbz(smi_reg, 0, branch_imm); | 1140 patcher.tbz(smi_reg, 0, branch_imm); |
| 1174 } | 1141 } |
| 1175 } | 1142 } |
| 1176 } | 1143 } |
| 1177 } // namespace v8::internal | 1144 } // namespace v8::internal |
| 1178 | 1145 |
| 1179 #endif // V8_TARGET_ARCH_ARM64 | 1146 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |