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 #include "src/crankshaft/ppc/lithium-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-ppc.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
10 #include "src/crankshaft/lithium-inl.h" | 10 #include "src/crankshaft/lithium-inl.h" |
(...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1982 UNREACHABLE(); | 1982 UNREACHABLE(); |
1983 return NULL; | 1983 return NULL; |
1984 } | 1984 } |
1985 } | 1985 } |
1986 | 1986 |
1987 | 1987 |
1988 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 1988 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
1989 LOperand* context = UseFixed(instr->context(), cp); | 1989 LOperand* context = UseFixed(instr->context(), cp); |
1990 LOperand* global_object = | 1990 LOperand* global_object = |
1991 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); | 1991 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); |
1992 LOperand* vector = NULL; | 1992 LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); |
1993 if (instr->HasVectorAndSlot()) { | |
1994 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); | |
1995 } | |
1996 LLoadGlobalGeneric* result = | 1993 LLoadGlobalGeneric* result = |
1997 new (zone()) LLoadGlobalGeneric(context, global_object, vector); | 1994 new (zone()) LLoadGlobalGeneric(context, global_object, vector); |
1998 return MarkAsCall(DefineFixed(result, r3), instr); | 1995 return MarkAsCall(DefineFixed(result, r3), instr); |
1999 } | 1996 } |
2000 | 1997 |
2001 | 1998 |
2002 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1999 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
2003 LOperand* context = UseRegisterAtStart(instr->value()); | 2000 LOperand* context = UseRegisterAtStart(instr->value()); |
2004 LInstruction* result = | 2001 LInstruction* result = |
2005 DefineAsRegister(new (zone()) LLoadContextSlot(context)); | 2002 DefineAsRegister(new (zone()) LLoadContextSlot(context)); |
(...skipping 25 matching lines...) Expand all Loading... |
2031 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 2028 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
2032 LOperand* obj = UseRegisterAtStart(instr->object()); | 2029 LOperand* obj = UseRegisterAtStart(instr->object()); |
2033 return DefineAsRegister(new (zone()) LLoadNamedField(obj)); | 2030 return DefineAsRegister(new (zone()) LLoadNamedField(obj)); |
2034 } | 2031 } |
2035 | 2032 |
2036 | 2033 |
2037 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2034 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
2038 LOperand* context = UseFixed(instr->context(), cp); | 2035 LOperand* context = UseFixed(instr->context(), cp); |
2039 LOperand* object = | 2036 LOperand* object = |
2040 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2037 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
2041 LOperand* vector = NULL; | 2038 LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); |
2042 if (instr->HasVectorAndSlot()) { | |
2043 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); | |
2044 } | |
2045 | 2039 |
2046 LInstruction* result = | 2040 LInstruction* result = |
2047 DefineFixed(new (zone()) LLoadNamedGeneric(context, object, vector), r3); | 2041 DefineFixed(new (zone()) LLoadNamedGeneric(context, object, vector), r3); |
2048 return MarkAsCall(result, instr); | 2042 return MarkAsCall(result, instr); |
2049 } | 2043 } |
2050 | 2044 |
2051 | 2045 |
2052 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2046 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
2053 HLoadFunctionPrototype* instr) { | 2047 HLoadFunctionPrototype* instr) { |
2054 return AssignEnvironment(DefineAsRegister( | 2048 return AssignEnvironment(DefineAsRegister( |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2104 } | 2098 } |
2105 return result; | 2099 return result; |
2106 } | 2100 } |
2107 | 2101 |
2108 | 2102 |
2109 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2103 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
2110 LOperand* context = UseFixed(instr->context(), cp); | 2104 LOperand* context = UseFixed(instr->context(), cp); |
2111 LOperand* object = | 2105 LOperand* object = |
2112 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); | 2106 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
2113 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); | 2107 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); |
2114 LOperand* vector = NULL; | 2108 LOperand* vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); |
2115 if (instr->HasVectorAndSlot()) { | |
2116 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); | |
2117 } | |
2118 | 2109 |
2119 LInstruction* result = DefineFixed( | 2110 LInstruction* result = DefineFixed( |
2120 new (zone()) LLoadKeyedGeneric(context, object, key, vector), r3); | 2111 new (zone()) LLoadKeyedGeneric(context, object, key, vector), r3); |
2121 return MarkAsCall(result, instr); | 2112 return MarkAsCall(result, instr); |
2122 } | 2113 } |
2123 | 2114 |
2124 | 2115 |
2125 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2116 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
2126 if (!instr->is_fixed_typed_array()) { | 2117 if (!instr->is_fixed_typed_array()) { |
2127 DCHECK(instr->elements()->representation().IsTagged()); | 2118 DCHECK(instr->elements()->representation().IsTagged()); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2166 LOperand* context = UseFixed(instr->context(), cp); | 2157 LOperand* context = UseFixed(instr->context(), cp); |
2167 LOperand* obj = | 2158 LOperand* obj = |
2168 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | 2159 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
2169 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); | 2160 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); |
2170 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | 2161 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
2171 | 2162 |
2172 DCHECK(instr->object()->representation().IsTagged()); | 2163 DCHECK(instr->object()->representation().IsTagged()); |
2173 DCHECK(instr->key()->representation().IsTagged()); | 2164 DCHECK(instr->key()->representation().IsTagged()); |
2174 DCHECK(instr->value()->representation().IsTagged()); | 2165 DCHECK(instr->value()->representation().IsTagged()); |
2175 | 2166 |
2176 LOperand* slot = NULL; | 2167 LOperand* slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); |
2177 LOperand* vector = NULL; | 2168 LOperand* vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); |
2178 if (instr->HasVectorAndSlot()) { | |
2179 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); | |
2180 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); | |
2181 } | |
2182 | 2169 |
2183 LStoreKeyedGeneric* result = | 2170 LStoreKeyedGeneric* result = |
2184 new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector); | 2171 new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector); |
2185 return MarkAsCall(result, instr); | 2172 return MarkAsCall(result, instr); |
2186 } | 2173 } |
2187 | 2174 |
2188 | 2175 |
2189 LInstruction* LChunkBuilder::DoTransitionElementsKind( | 2176 LInstruction* LChunkBuilder::DoTransitionElementsKind( |
2190 HTransitionElementsKind* instr) { | 2177 HTransitionElementsKind* instr) { |
2191 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { | 2178 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2259 | 2246 |
2260 return new (zone()) LStoreNamedField(obj, val, temp); | 2247 return new (zone()) LStoreNamedField(obj, val, temp); |
2261 } | 2248 } |
2262 | 2249 |
2263 | 2250 |
2264 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2251 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
2265 LOperand* context = UseFixed(instr->context(), cp); | 2252 LOperand* context = UseFixed(instr->context(), cp); |
2266 LOperand* obj = | 2253 LOperand* obj = |
2267 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | 2254 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
2268 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | 2255 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
2269 LOperand* slot = NULL; | 2256 LOperand* slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); |
2270 LOperand* vector = NULL; | 2257 LOperand* vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); |
2271 if (instr->HasVectorAndSlot()) { | |
2272 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); | |
2273 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); | |
2274 } | |
2275 | |
2276 LStoreNamedGeneric* result = | 2258 LStoreNamedGeneric* result = |
2277 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); | 2259 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); |
2278 return MarkAsCall(result, instr); | 2260 return MarkAsCall(result, instr); |
2279 } | 2261 } |
2280 | 2262 |
2281 | 2263 |
2282 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2264 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
2283 LOperand* context = UseFixed(instr->context(), cp); | 2265 LOperand* context = UseFixed(instr->context(), cp); |
2284 LOperand* left = UseFixed(instr->left(), r4); | 2266 LOperand* left = UseFixed(instr->left(), r4); |
2285 LOperand* right = UseFixed(instr->right(), r3); | 2267 LOperand* right = UseFixed(instr->right(), r3); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2486 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2468 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2487 LOperand* object = UseRegister(instr->object()); | 2469 LOperand* object = UseRegister(instr->object()); |
2488 LOperand* index = UseTempRegister(instr->index()); | 2470 LOperand* index = UseTempRegister(instr->index()); |
2489 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); | 2471 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); |
2490 LInstruction* result = DefineSameAsFirst(load); | 2472 LInstruction* result = DefineSameAsFirst(load); |
2491 return AssignPointerMap(result); | 2473 return AssignPointerMap(result); |
2492 } | 2474 } |
2493 | 2475 |
2494 } // namespace internal | 2476 } // namespace internal |
2495 } // namespace v8 | 2477 } // namespace v8 |
OLD | NEW |