| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 patcher.EmitCondition(ne); | 107 patcher.EmitCondition(ne); |
| 140 } else { | 108 } else { |
| 141 DCHECK(Assembler::GetCondition(branch_instr) == ne); | 109 DCHECK(Assembler::GetCondition(branch_instr) == ne); |
| 142 patcher.EmitCondition(eq); | 110 patcher.EmitCondition(eq); |
| 143 } | 111 } |
| 144 } | 112 } |
| 145 } // namespace internal | 113 } // namespace internal |
| 146 } // namespace v8 | 114 } // namespace v8 |
| 147 | 115 |
| 148 #endif // V8_TARGET_ARCH_PPC | 116 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |