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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
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 // ---------------------------------------------------------------------------- | |
17 // Static IC stub generators. | |
18 // | |
19 | |
20 #define __ ACCESS_MASM(masm) | |
21 | |
22 static void StoreIC_PushArgs(MacroAssembler* masm) { | |
23 __ Push(StoreWithVectorDescriptor::ValueRegister(), | |
24 StoreWithVectorDescriptor::SlotRegister(), | |
25 StoreWithVectorDescriptor::VectorRegister(), | |
26 StoreWithVectorDescriptor::ReceiverRegister(), | |
27 StoreWithVectorDescriptor::NameRegister()); | |
28 } | |
29 | |
30 | |
31 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { | |
32 StoreIC_PushArgs(masm); | |
33 | |
34 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss); | |
35 } | |
36 | |
37 void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) { | |
38 StoreIC_PushArgs(masm); | |
39 | |
40 // The slow case calls into the runtime to complete the store without causing | |
41 // an IC miss that would otherwise cause a transition to the generic stub. | |
42 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow); | |
43 } | |
44 | |
45 #undef __ | |
46 | |
47 | |
48 Condition CompareIC::ComputeCondition(Token::Value op) { | 16 Condition CompareIC::ComputeCondition(Token::Value op) { |
49 switch (op) { | 17 switch (op) { |
50 case Token::EQ_STRICT: | 18 case Token::EQ_STRICT: |
51 case Token::EQ: | 19 case Token::EQ: |
52 return eq; | 20 return eq; |
53 case Token::LT: | 21 case Token::LT: |
54 return lt; | 22 return lt; |
55 case Token::GT: | 23 case Token::GT: |
56 return gt; | 24 return gt; |
57 case Token::LTE: | 25 case Token::LTE: |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 break; | 133 break; |
166 default: | 134 default: |
167 UNIMPLEMENTED(); | 135 UNIMPLEMENTED(); |
168 } | 136 } |
169 patcher.ChangeBranchCondition(branch_instr, opcode); | 137 patcher.ChangeBranchCondition(branch_instr, opcode); |
170 } | 138 } |
171 } // namespace internal | 139 } // namespace internal |
172 } // namespace v8 | 140 } // namespace v8 |
173 | 141 |
174 #endif // V8_TARGET_ARCH_MIPS64 | 142 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |