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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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" |
11 | 11 |
12 namespace v8 { | 12 namespace v8 { |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 | 15 |
16 #define __ ACCESS_MASM(masm) | |
17 | |
18 static void StoreIC_PushArgs(MacroAssembler* masm) { | |
19 __ Push(StoreWithVectorDescriptor::ValueRegister(), | |
20 StoreWithVectorDescriptor::SlotRegister(), | |
21 StoreWithVectorDescriptor::VectorRegister(), | |
22 StoreWithVectorDescriptor::ReceiverRegister(), | |
23 StoreWithVectorDescriptor::NameRegister()); | |
24 } | |
25 | |
26 | |
27 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { | |
28 ASM_LOCATION("KeyedStoreIC::GenerateMiss"); | |
29 StoreIC_PushArgs(masm); | |
30 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss); | |
31 } | |
32 | |
33 void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) { | |
34 ASM_LOCATION("KeyedStoreIC::GenerateSlow"); | |
35 StoreIC_PushArgs(masm); | |
36 | |
37 // The slow case calls into the runtime to complete the store without causing | |
38 // an IC miss that would otherwise cause a transition to the generic stub. | |
39 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow); | |
40 } | |
41 | |
42 Condition CompareIC::ComputeCondition(Token::Value op) { | 16 Condition CompareIC::ComputeCondition(Token::Value op) { |
43 switch (op) { | 17 switch (op) { |
44 case Token::EQ_STRICT: | 18 case Token::EQ_STRICT: |
45 case Token::EQ: | 19 case Token::EQ: |
46 return eq; | 20 return eq; |
47 case Token::LT: | 21 case Token::LT: |
48 return lt; | 22 return lt; |
49 case Token::GT: | 23 case Token::GT: |
50 return gt; | 24 return gt; |
51 case Token::LTE: | 25 case Token::LTE: |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 } else { | 97 } else { |
124 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); | 98 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); |
125 // This is JumpIfSmi(smi_reg, branch_imm). | 99 // This is JumpIfSmi(smi_reg, branch_imm). |
126 patcher.tbz(smi_reg, 0, branch_imm); | 100 patcher.tbz(smi_reg, 0, branch_imm); |
127 } | 101 } |
128 } | 102 } |
129 } // namespace internal | 103 } // namespace internal |
130 } // namespace v8 | 104 } // namespace v8 |
131 | 105 |
132 #endif // V8_TARGET_ARCH_ARM64 | 106 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |