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

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

Issue 508673002: MIPS: Move register conventions out of the IC classes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits. 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-codegen-mips.cc ('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 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after
2044 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { 2044 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) {
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 = UseFixed(instr->global_object(), 2054 LOperand* global_object =
2055 LoadIC::ReceiverRegister()); 2055 UseFixed(instr->global_object(), LoadConvention::ReceiverRegister());
2056 LOperand* vector = NULL; 2056 LOperand* vector = NULL;
2057 if (FLAG_vector_ics) { 2057 if (FLAG_vector_ics) {
2058 vector = FixedTemp(LoadIC::VectorRegister()); 2058 vector = FixedTemp(FullVectorLoadConvention::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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2103 2103
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 = UseFixed(instr->object(), LoadIC::ReceiverRegister()); 2113 LOperand* object =
2114 UseFixed(instr->object(), LoadConvention::ReceiverRegister());
2114 LOperand* vector = NULL; 2115 LOperand* vector = NULL;
2115 if (FLAG_vector_ics) { 2116 if (FLAG_vector_ics) {
2116 vector = FixedTemp(LoadIC::VectorRegister()); 2117 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
2117 } 2118 }
2118 2119
2119 LInstruction* result = 2120 LInstruction* result =
2120 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), v0); 2121 DefineFixed(new(zone()) LLoadNamedGeneric(context, object, vector), v0);
2121 return MarkAsCall(result, instr); 2122 return MarkAsCall(result, instr);
2122 } 2123 }
2123 2124
2124 2125
2125 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( 2126 LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
2126 HLoadFunctionPrototype* instr) { 2127 HLoadFunctionPrototype* instr) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
2168 // LCodeGen::DoLoadKeyedFixedArray 2169 // LCodeGen::DoLoadKeyedFixedArray
2169 instr->RequiresHoleCheck()) { 2170 instr->RequiresHoleCheck()) {
2170 result = AssignEnvironment(result); 2171 result = AssignEnvironment(result);
2171 } 2172 }
2172 return result; 2173 return result;
2173 } 2174 }
2174 2175
2175 2176
2176 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 2177 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
2177 LOperand* context = UseFixed(instr->context(), cp); 2178 LOperand* context = UseFixed(instr->context(), cp);
2178 LOperand* object = UseFixed(instr->object(), LoadIC::ReceiverRegister()); 2179 LOperand* object =
2179 LOperand* key = UseFixed(instr->key(), LoadIC::NameRegister()); 2180 UseFixed(instr->object(), LoadConvention::ReceiverRegister());
2181 LOperand* key = UseFixed(instr->key(), LoadConvention::NameRegister());
2180 LOperand* vector = NULL; 2182 LOperand* vector = NULL;
2181 if (FLAG_vector_ics) { 2183 if (FLAG_vector_ics) {
2182 vector = FixedTemp(LoadIC::VectorRegister()); 2184 vector = FixedTemp(FullVectorLoadConvention::VectorRegister());
2183 } 2185 }
2184 2186
2185 LInstruction* result = 2187 LInstruction* result =
2186 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), 2188 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector),
2187 v0); 2189 v0);
2188 return MarkAsCall(result, instr); 2190 return MarkAsCall(result, instr);
2189 } 2191 }
2190 2192
2191 2193
2192 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { 2194 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
2572 LOperand* context = UseFixed(instr->context(), cp); 2576 LOperand* context = UseFixed(instr->context(), cp);
2573 LOperand* function = UseRegisterAtStart(instr->function()); 2577 LOperand* function = UseRegisterAtStart(instr->function());
2574 LAllocateBlockContext* result = 2578 LAllocateBlockContext* result =
2575 new(zone()) LAllocateBlockContext(context, function); 2579 new(zone()) LAllocateBlockContext(context, function);
2576 return MarkAsCall(DefineFixed(result, cp), instr); 2580 return MarkAsCall(DefineFixed(result, cp), instr);
2577 } 2581 }
2578 2582
2579 } } // namespace v8::internal 2583 } } // namespace v8::internal
2580 2584
2581 #endif // V8_TARGET_ARCH_MIPS 2585 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698