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

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 9429005: MIPS: Added support for Loongson architectures. (Closed)
Patch Set: rebased on r10962. Created 8 years, 9 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
« no previous file with comments | « src/mips/disasm-mips.cc ('k') | src/mips/ic-mips.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 } else if (var->mode() == DYNAMIC_LOCAL) { 1234 } else if (var->mode() == DYNAMIC_LOCAL) {
1235 Variable* local = var->local_if_not_shadowed(); 1235 Variable* local = var->local_if_not_shadowed();
1236 __ lw(v0, ContextSlotOperandCheckExtensions(local, slow)); 1236 __ lw(v0, ContextSlotOperandCheckExtensions(local, slow));
1237 if (local->mode() == CONST || 1237 if (local->mode() == CONST ||
1238 local->mode() == CONST_HARMONY || 1238 local->mode() == CONST_HARMONY ||
1239 local->mode() == LET) { 1239 local->mode() == LET) {
1240 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 1240 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
1241 __ subu(at, v0, at); // Sub as compare: at == 0 on eq. 1241 __ subu(at, v0, at); // Sub as compare: at == 0 on eq.
1242 if (local->mode() == CONST) { 1242 if (local->mode() == CONST) {
1243 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); 1243 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex);
1244 __ movz(v0, a0, at); // Conditional move: return Undefined if TheHole. 1244 __ Movz(v0, a0, at); // Conditional move: return Undefined if TheHole.
1245 } else { // LET || CONST_HARMONY 1245 } else { // LET || CONST_HARMONY
1246 __ Branch(done, ne, at, Operand(zero_reg)); 1246 __ Branch(done, ne, at, Operand(zero_reg));
1247 __ li(a0, Operand(var->name())); 1247 __ li(a0, Operand(var->name()));
1248 __ push(a0); 1248 __ push(a0);
1249 __ CallRuntime(Runtime::kThrowReferenceError, 1); 1249 __ CallRuntime(Runtime::kThrowReferenceError, 1);
1250 } 1250 }
1251 } 1251 }
1252 __ Branch(done); 1252 __ Branch(done);
1253 } 1253 }
1254 } 1254 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 Label done; 1326 Label done;
1327 __ Branch(&done, ne, at, Operand(zero_reg)); 1327 __ Branch(&done, ne, at, Operand(zero_reg));
1328 __ li(a0, Operand(var->name())); 1328 __ li(a0, Operand(var->name()));
1329 __ push(a0); 1329 __ push(a0);
1330 __ CallRuntime(Runtime::kThrowReferenceError, 1); 1330 __ CallRuntime(Runtime::kThrowReferenceError, 1);
1331 __ bind(&done); 1331 __ bind(&done);
1332 } else { 1332 } else {
1333 // Uninitalized const bindings outside of harmony mode are unholed. 1333 // Uninitalized const bindings outside of harmony mode are unholed.
1334 ASSERT(var->mode() == CONST); 1334 ASSERT(var->mode() == CONST);
1335 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); 1335 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex);
1336 __ movz(v0, a0, at); // Conditional move: Undefined if TheHole. 1336 __ Movz(v0, a0, at); // Conditional move: Undefined if TheHole.
1337 } 1337 }
1338 context()->Plug(v0); 1338 context()->Plug(v0);
1339 break; 1339 break;
1340 } 1340 }
1341 } 1341 }
1342 context()->Plug(var); 1342 context()->Plug(var);
1343 break; 1343 break;
1344 } 1344 }
1345 1345
1346 case Variable::LOOKUP: { 1346 case Variable::LOOKUP: {
(...skipping 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after
4434 *context_length = 0; 4434 *context_length = 0;
4435 return previous_; 4435 return previous_;
4436 } 4436 }
4437 4437
4438 4438
4439 #undef __ 4439 #undef __
4440 4440
4441 } } // namespace v8::internal 4441 } } // namespace v8::internal
4442 4442
4443 #endif // V8_TARGET_ARCH_MIPS 4443 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/disasm-mips.cc ('k') | src/mips/ic-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698