Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Side by Side Diff: src/mips/lithium-mips.cc

Issue 538573002: MIPS: Make concrete classes for individual call descriptors. - internal (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: mips64 port added. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_MIPS 7 #if V8_TARGET_ARCH_MIPS
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
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) {
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; 2045 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell;
2046 return instr->RequiresHoleCheck() 2046 return instr->RequiresHoleCheck()
2047 ? AssignEnvironment(DefineAsRegister(result)) 2047 ? AssignEnvironment(DefineAsRegister(result))
2048 : DefineAsRegister(result); 2048 : DefineAsRegister(result);
2049 } 2049 }
2050 2050
2051 2051
2052 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { 2052 LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
2053 LOperand* context = UseFixed(instr->context(), cp); 2053 LOperand* context = UseFixed(instr->context(), cp);
2054 LOperand* global_object = 2054 LOperand* global_object =
2055 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister()); 2055 UseFixed(instr->global_object(), LoadDescriptor::ReceiverRegister());
2056 LOperand* vector = NULL; 2056 LOperand* vector = NULL;
2057 if (FLAG_vector_ics) { 2057 if (FLAG_vector_ics) {
2058 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); 2058 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
2059 } 2059 }
2060 LLoadGlobalGeneric* result = 2060 LLoadGlobalGeneric* result =
2061 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 2061 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
2062 return MarkAsCall(DefineFixed(result, v0), instr); 2062 return MarkAsCall(DefineFixed(result, v0), instr);
2063 } 2063 }
2064 2064
2065 2065
2066 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { 2066 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) {
2067 LOperand* value = UseRegister(instr->value()); 2067 LOperand* value = UseRegister(instr->value());
2068 // Use a temp to check the value in the cell in the case where we perform 2068 // 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
2104 2104
2105 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { 2105 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
2106 LOperand* obj = UseRegisterAtStart(instr->object()); 2106 LOperand* obj = UseRegisterAtStart(instr->object());
2107 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); 2107 return DefineAsRegister(new(zone()) LLoadNamedField(obj));
2108 } 2108 }
2109 2109
2110 2110
2111 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { 2111 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
2112 LOperand* context = UseFixed(instr->context(), cp); 2112 LOperand* context = UseFixed(instr->context(), cp);
2113 LOperand* object = 2113 LOperand* object =
2114 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); 2114 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
2115 LOperand* vector = NULL; 2115 LOperand* vector = NULL;
2116 if (FLAG_vector_ics) { 2116 if (FLAG_vector_ics) {
2117 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); 2117 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
2118 } 2118 }
2119 2119
2120 LInstruction* result = 2120 LInstruction* result =
2121 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), v0); 2121 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), v0);
2122 return MarkAsCall(result, instr); 2122 return MarkAsCall(result, instr);
2123 } 2123 }
2124 2124
2125 2125
2126 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 2126 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
2127 HLoadFunctionPrototype* instr) { 2127 HLoadFunctionPrototype* instr) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 instr->RequiresHoleCheck()) { 2170 instr->RequiresHoleCheck()) {
2171 result = AssignEnvironment(result); 2171 result = AssignEnvironment(result);
2172 } 2172 }
2173 return result; 2173 return result;
2174 } 2174 }
2175 2175
2176 2176
2177 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 2177 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
2178 LOperand* context = UseFixed(instr->context(), cp); 2178 LOperand* context = UseFixed(instr->context(), cp);
2179 LOperand* object = 2179 LOperand* object =
2180 UseFixed(instr->object(), LoadConvention::ReceiverRegister()); 2180 UseFixed(instr->object(), LoadDescriptor::ReceiverRegister());
2181 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister()); 2181 LOperand* key = UseFixed(instr->key(), LoadDescriptor::NameRegister());
2182 LOperand* vector = NULL; 2182 LOperand* vector = NULL;
2183 if (FLAG_vector_ics) { 2183 if (FLAG_vector_ics) {
2184 vector = FixedTemp(FullVectorLoadConvention::VectorRegister()); 2184 vector = FixedTemp(VectorLoadICDescriptor::VectorRegister());
2185 } 2185 }
2186 2186
2187 LInstruction* result = 2187 LInstruction* result =
2188 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), 2188 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector),
2189 v0); 2189 v0);
2190 return MarkAsCall(result, instr); 2190 return MarkAsCall(result, instr);
2191 } 2191 }
2192 2192
2193 2193
2194 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { 2194 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
2577 LOperand* context = UseFixed(instr->context(), cp); 2577 LOperand* context = UseFixed(instr->context(), cp);
2578 LOperand* function = UseRegisterAtStart(instr->function()); 2578 LOperand* function = UseRegisterAtStart(instr->function());
2579 LAllocateBlockContext* result = 2579 LAllocateBlockContext* result =
2580 new(zone()) LAllocateBlockContext(context, function); 2580 new(zone()) LAllocateBlockContext(context, function);
2581 return MarkAsCall(DefineFixed(result, cp), instr); 2581 return MarkAsCall(DefineFixed(result, cp), instr);
2582 } 2582 }
2583 2583
2584 } } // namespace v8::internal 2584 } } // namespace v8::internal
2585 2585
2586 #endif // V8_TARGET_ARCH_MIPS 2586 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698