| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
| 10 #include "src/lithium-inl.h" | 10 #include "src/lithium-inl.h" |
| (...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2042 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | 2042 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { |
| 2043 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; | 2043 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; |
| 2044 return instr->RequiresHoleCheck() | 2044 return instr->RequiresHoleCheck() |
| 2045 ? AssignEnvironment(DefineAsRegister(result)) | 2045 ? AssignEnvironment(DefineAsRegister(result)) |
| 2046 : DefineAsRegister(result); | 2046 : DefineAsRegister(result); |
| 2047 } | 2047 } |
| 2048 | 2048 |
| 2049 | 2049 |
| 2050 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { | 2050 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
| 2051 LOperand* context = UseFixed(instr->context(), cp); | 2051 LOperand* context = UseFixed(instr->context(), cp); |
| 2052 LOperand* global_object = UseFixed(instr->global_object(), | 2052 LOperand* global_object = |
| 2053 LoadIC::ReceiverRegister()); | 2053 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister()); |
| 2054 LOperand* vector = NULL; | 2054 LOperand* vector = NULL; |
| 2055 if (FLAG_vector_ics) { | 2055 if (FLAG_vector_ics) { |
| 2056 vector = FixedTemp(LoadIC::VectorRegister()); | 2056 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); |
| 2057 } | 2057 } |
| 2058 LLoadGlobalGeneric* result = | 2058 LLoadGlobalGeneric* result = |
| 2059 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 2059 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
| 2060 return MarkAsCall(DefineFixed(result, v0), instr); | 2060 return MarkAsCall(DefineFixed(result, v0), instr); |
| 2061 } | 2061 } |
| 2062 | 2062 |
| 2063 | 2063 |
| 2064 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2064 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
| 2065 LOperand* value = UseRegister(instr->value()); | 2065 LOperand* value = UseRegister(instr->value()); |
| 2066 // Use a temp to check the value in the cell in the case where we perform | 2066 // Use a temp to check the value in the cell in the case where we perform |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2101 | 2101 |
| 2102 | 2102 |
| 2103 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 2103 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
| 2104 LOperand* obj = UseRegisterAtStart(instr->object()); | 2104 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 2105 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2105 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
| 2106 } | 2106 } |
| 2107 | 2107 |
| 2108 | 2108 |
| 2109 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2109 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 2110 LOperand* context = UseFixed(instr->context(), cp); | 2110 LOperand* context = UseFixed(instr->context(), cp); |
| 2111 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 2111 LOperand* object = |
| 2112 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); |
| 2112 LOperand* vector = NULL; | 2113 LOperand* vector = NULL; |
| 2113 if (FLAG_vector_ics) { | 2114 if (FLAG_vector_ics) { |
| 2114 vector = FixedTemp(LoadIC::VectorRegister()); | 2115 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); |
| 2115 } | 2116 } |
| 2116 | 2117 |
| 2117 LInstruction* result = | 2118 LInstruction* result = |
| 2118 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), v0); | 2119 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), v0); |
| 2119 return MarkAsCall(result, instr); | 2120 return MarkAsCall(result, instr); |
| 2120 } | 2121 } |
| 2121 | 2122 |
| 2122 | 2123 |
| 2123 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2124 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
| 2124 HLoadFunctionPrototype* instr) { | 2125 HLoadFunctionPrototype* instr) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2167 // LCodeGen::DoLoadKeyedFixedArray | 2168 // LCodeGen::DoLoadKeyedFixedArray |
| 2168 instr->RequiresHoleCheck()) { | 2169 instr->RequiresHoleCheck()) { |
| 2169 result = AssignEnvironment(result); | 2170 result = AssignEnvironment(result); |
| 2170 } | 2171 } |
| 2171 return result; | 2172 return result; |
| 2172 } | 2173 } |
| 2173 | 2174 |
| 2174 | 2175 |
| 2175 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2176 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
| 2176 LOperand* context = UseFixed(instr->context(), cp); | 2177 LOperand* context = UseFixed(instr->context(), cp); |
| 2177 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); | 2178 LOperand* object = |
| 2178 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); | 2179 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); |
| 2180 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister()); |
| 2179 LOperand* vector = NULL; | 2181 LOperand* vector = NULL; |
| 2180 if (FLAG_vector_ics) { | 2182 if (FLAG_vector_ics) { |
| 2181 vector = FixedTemp(LoadIC::VectorRegister()); | 2183 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); |
| 2182 } | 2184 } |
| 2183 | 2185 |
| 2184 LInstruction* result = | 2186 LInstruction* result = |
| 2185 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), | 2187 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), |
| 2186 v0); | 2188 v0); |
| 2187 return MarkAsCall(result, instr); | 2189 return MarkAsCall(result, instr); |
| 2188 } | 2190 } |
| 2189 | 2191 |
| 2190 | 2192 |
| 2191 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2193 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2228 instr->elements()->representation().IsExternal())); | 2230 instr->elements()->representation().IsExternal())); |
| 2229 LOperand* val = UseRegister(instr->value()); | 2231 LOperand* val = UseRegister(instr->value()); |
| 2230 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 2232 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 2231 LOperand* backing_store = UseRegister(instr->elements()); | 2233 LOperand* backing_store = UseRegister(instr->elements()); |
| 2232 return new(zone()) LStoreKeyed(backing_store, key, val); | 2234 return new(zone()) LStoreKeyed(backing_store, key, val); |
| 2233 } | 2235 } |
| 2234 | 2236 |
| 2235 | 2237 |
| 2236 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 2238 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
| 2237 LOperand* context = UseFixed(instr->context(), cp); | 2239 LOperand* context = UseFixed(instr->context(), cp); |
| 2238 LOperand* obj = UseFixed(instr->object(), KeyedStoreIC::ReceiverRegister()); | 2240 LOperand* obj = |
| 2239 LOperand* key = UseFixed(instr->key(), KeyedStoreIC::NameRegister()); | 2241 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); |
| 2240 LOperand* val = UseFixed(instr->value(), KeyedStoreIC::ValueRegister()); | 2242 LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister()); |
| 2243 LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister()); |
| 2241 | 2244 |
| 2242 DCHECK(instr->object()->representation().IsTagged()); | 2245 DCHECK(instr->object()->representation().IsTagged()); |
| 2243 DCHECK(instr->key()->representation().IsTagged()); | 2246 DCHECK(instr->key()->representation().IsTagged()); |
| 2244 DCHECK(instr->value()->representation().IsTagged()); | 2247 DCHECK(instr->value()->representation().IsTagged()); |
| 2245 | 2248 |
| 2246 return MarkAsCall( | 2249 return MarkAsCall( |
| 2247 new(zone()) LStoreKeyedGeneric(context, obj, key, val), instr); | 2250 new(zone()) LStoreKeyedGeneric(context, obj, key, val), instr); |
| 2248 } | 2251 } |
| 2249 | 2252 |
| 2250 | 2253 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2304 | 2307 |
| 2305 // We need a temporary register for write barrier of the map field. | 2308 // We need a temporary register for write barrier of the map field. |
| 2306 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2309 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
| 2307 | 2310 |
| 2308 return new(zone()) LStoreNamedField(obj, val, temp); | 2311 return new(zone()) LStoreNamedField(obj, val, temp); |
| 2309 } | 2312 } |
| 2310 | 2313 |
| 2311 | 2314 |
| 2312 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2315 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
| 2313 LOperand* context = UseFixed(instr->context(), cp); | 2316 LOperand* context = UseFixed(instr->context(), cp); |
| 2314 LOperand* obj = UseFixed(instr->object(), StoreIC::ReceiverRegister()); | 2317 LOperand* obj = |
| 2315 LOperand* val = UseFixed(instr->value(), StoreIC::ValueRegister()); | 2318 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); |
| 2319 LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister()); |
| 2316 | 2320 |
| 2317 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); | 2321 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); |
| 2318 return MarkAsCall(result, instr); | 2322 return MarkAsCall(result, instr); |
| 2319 } | 2323 } |
| 2320 | 2324 |
| 2321 | 2325 |
| 2322 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2326 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
| 2323 LOperand* context = UseFixed(instr->context(), cp); | 2327 LOperand* context = UseFixed(instr->context(), cp); |
| 2324 LOperand* left = UseFixed(instr->left(), a1); | 2328 LOperand* left = UseFixed(instr->left(), a1); |
| 2325 LOperand* right = UseFixed(instr->right(), a0); | 2329 LOperand* right = UseFixed(instr->right(), a0); |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2572 LOperand* function = UseRegisterAtStart(instr->function()); | 2576 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2573 LAllocateBlockContext* result = | 2577 LAllocateBlockContext* result = |
| 2574 new(zone()) LAllocateBlockContext(context, function); | 2578 new(zone()) LAllocateBlockContext(context, function); |
| 2575 return MarkAsCall(DefineFixed(result, cp), instr); | 2579 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2576 } | 2580 } |
| 2577 | 2581 |
| 2578 | 2582 |
| 2579 } } // namespace v8::internal | 2583 } } // namespace v8::internal |
| 2580 | 2584 |
| 2581 #endif // V8_TARGET_ARCH_MIPS64 | 2585 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |