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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 LOperand* function = UseFixed(instr->function(), a1); | 1080 LOperand* function = UseFixed(instr->function(), a1); |
1081 | 1081 |
1082 LCallJSFunction* result = new(zone()) LCallJSFunction(function); | 1082 LCallJSFunction* result = new(zone()) LCallJSFunction(function); |
1083 | 1083 |
1084 return MarkAsCall(DefineFixed(result, v0), instr); | 1084 return MarkAsCall(DefineFixed(result, v0), instr); |
1085 } | 1085 } |
1086 | 1086 |
1087 | 1087 |
1088 LInstruction* LChunkBuilder::DoCallWithDescriptor( | 1088 LInstruction* LChunkBuilder::DoCallWithDescriptor( |
1089 HCallWithDescriptor* instr) { | 1089 HCallWithDescriptor* instr) { |
1090 const CallInterfaceDescriptor* descriptor = instr->descriptor(); | 1090 CallInterfaceDescriptor descriptor = instr->descriptor(); |
1091 | 1091 |
1092 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); | 1092 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); |
1093 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); | 1093 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); |
1094 ops.Add(target, zone()); | 1094 ops.Add(target, zone()); |
1095 for (int i = 1; i < instr->OperandCount(); i++) { | 1095 for (int i = 1; i < instr->OperandCount(); i++) { |
1096 LOperand* op = UseFixed(instr->OperandAt(i), | 1096 LOperand* op = |
1097 descriptor->GetParameterRegister(i - 1)); | 1097 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1)); |
1098 ops.Add(op, zone()); | 1098 ops.Add(op, zone()); |
1099 } | 1099 } |
1100 | 1100 |
1101 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( | 1101 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( |
1102 descriptor, ops, zone()); | 1102 descriptor, ops, zone()); |
1103 return MarkAsCall(DefineFixed(result, v0), instr); | 1103 return MarkAsCall(DefineFixed(result, v0), instr); |
1104 } | 1104 } |
1105 | 1105 |
1106 | 1106 |
1107 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { | 1107 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
1108 LOperand* context = UseFixed(instr->context(), cp); | 1108 LOperand* context = UseFixed(instr->context(), cp); |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 = | 2052 LOperand* global_object = |
2053 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister()); | 2053 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister()); |
2054 LOperand* vector = NULL; | 2054 LOperand* vector = NULL; |
2055 if (FLAG_vector_ics) { | 2055 if (FLAG_vector_ics) { |
2056 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); | 2056 vector = FixedTemp(VectorLoadICDescriptor::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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 = | 2111 LOperand* object = |
2112 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); | 2112 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
2113 LOperand* vector = NULL; | 2113 LOperand* vector = NULL; |
2114 if (FLAG_vector_ics) { | 2114 if (FLAG_vector_ics) { |
2115 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); | 2115 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
2116 } | 2116 } |
2117 | 2117 |
2118 LInstruction* result = | 2118 LInstruction* result = |
2119 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), v0); | 2119 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), v0); |
2120 return MarkAsCall(result, instr); | 2120 return MarkAsCall(result, instr); |
2121 } | 2121 } |
2122 | 2122 |
2123 | 2123 |
2124 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2124 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
2125 HLoadFunctionPrototype* instr) { | 2125 HLoadFunctionPrototype* instr) { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2169 instr->RequiresHoleCheck()) { | 2169 instr->RequiresHoleCheck()) { |
2170 result = AssignEnvironment(result); | 2170 result = AssignEnvironment(result); |
2171 } | 2171 } |
2172 return result; | 2172 return result; |
2173 } | 2173 } |
2174 | 2174 |
2175 | 2175 |
2176 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2176 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
2177 LOperand* context = UseFixed(instr->context(), cp); | 2177 LOperand* context = UseFixed(instr->context(), cp); |
2178 LOperand* object = | 2178 LOperand* object = |
2179 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); | 2179 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister()); |
2180 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister()); | 2180 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister()); |
2181 LOperand* vector = NULL; | 2181 LOperand* vector = NULL; |
2182 if (FLAG_vector_ics) { | 2182 if (FLAG_vector_ics) { |
2183 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); | 2183 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister()); |
2184 } | 2184 } |
2185 | 2185 |
2186 LInstruction* result = | 2186 LInstruction* result = |
2187 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), | 2187 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), |
2188 v0); | 2188 v0); |
2189 return MarkAsCall(result, instr); | 2189 return MarkAsCall(result, instr); |
2190 } | 2190 } |
2191 | 2191 |
2192 | 2192 |
2193 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2193 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2231 LOperand* val = UseRegister(instr->value()); | 2231 LOperand* val = UseRegister(instr->value()); |
2232 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 2232 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
2233 LOperand* backing_store = UseRegister(instr->elements()); | 2233 LOperand* backing_store = UseRegister(instr->elements()); |
2234 return new(zone()) LStoreKeyed(backing_store, key, val); | 2234 return new(zone()) LStoreKeyed(backing_store, key, val); |
2235 } | 2235 } |
2236 | 2236 |
2237 | 2237 |
2238 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 2238 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
2239 LOperand* context = UseFixed(instr->context(), cp); | 2239 LOperand* context = UseFixed(instr->context(), cp); |
2240 LOperand* obj = | 2240 LOperand* obj = |
2241 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); | 2241 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
2242 LOperand* key = UseFixed(instr->key(), StoreConvention::NameRegister()); | 2242 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); |
2243 LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister()); | 2243 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
2244 | 2244 |
2245 DCHECK(instr->object()->representation().IsTagged()); | 2245 DCHECK(instr->object()->representation().IsTagged()); |
2246 DCHECK(instr->key()->representation().IsTagged()); | 2246 DCHECK(instr->key()->representation().IsTagged()); |
2247 DCHECK(instr->value()->representation().IsTagged()); | 2247 DCHECK(instr->value()->representation().IsTagged()); |
2248 | 2248 |
2249 return MarkAsCall( | 2249 return MarkAsCall( |
2250 new(zone()) LStoreKeyedGeneric(context, obj, key, val), instr); | 2250 new(zone()) LStoreKeyedGeneric(context, obj, key, val), instr); |
2251 } | 2251 } |
2252 | 2252 |
2253 | 2253 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2308 // 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. |
2309 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2309 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
2310 | 2310 |
2311 return new(zone()) LStoreNamedField(obj, val, temp); | 2311 return new(zone()) LStoreNamedField(obj, val, temp); |
2312 } | 2312 } |
2313 | 2313 |
2314 | 2314 |
2315 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2315 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
2316 LOperand* context = UseFixed(instr->context(), cp); | 2316 LOperand* context = UseFixed(instr->context(), cp); |
2317 LOperand* obj = | 2317 LOperand* obj = |
2318 UseFixed(instr->object(), StoreConvention::ReceiverRegister()); | 2318 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); |
2319 LOperand* val = UseFixed(instr->value(), StoreConvention::ValueRegister()); | 2319 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); |
2320 | 2320 |
2321 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); | 2321 LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); |
2322 return MarkAsCall(result, instr); | 2322 return MarkAsCall(result, instr); |
2323 } | 2323 } |
2324 | 2324 |
2325 | 2325 |
2326 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2326 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
2327 LOperand* context = UseFixed(instr->context(), cp); | 2327 LOperand* context = UseFixed(instr->context(), cp); |
2328 LOperand* left = UseFixed(instr->left(), a1); | 2328 LOperand* left = UseFixed(instr->left(), a1); |
2329 LOperand* right = UseFixed(instr->right(), a0); | 2329 LOperand* right = UseFixed(instr->right(), a0); |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2577 LOperand* function = UseRegisterAtStart(instr->function()); | 2577 LOperand* function = UseRegisterAtStart(instr->function()); |
2578 LAllocateBlockContext* result = | 2578 LAllocateBlockContext* result = |
2579 new(zone()) LAllocateBlockContext(context, function); | 2579 new(zone()) LAllocateBlockContext(context, function); |
2580 return MarkAsCall(DefineFixed(result, cp), instr); | 2580 return MarkAsCall(DefineFixed(result, cp), instr); |
2581 } | 2581 } |
2582 | 2582 |
2583 | 2583 |
2584 } } // namespace v8::internal | 2584 } } // namespace v8::internal |
2585 | 2585 |
2586 #endif // V8_TARGET_ARCH_MIPS64 | 2586 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |