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

Side by Side Diff: src/compiler/mips64/code-generator-mips64.cc

Issue 1211373002: [turbofan] Canonicalize return sequence for JSFunctions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/compiler/mips/code-generator-mips.cc ('k') | src/compiler/x64/code-generator-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 #include "src/compiler/code-generator-impl.h" 6 #include "src/compiler/code-generator-impl.h"
7 #include "src/compiler/gap-resolver.h" 7 #include "src/compiler/gap-resolver.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/mips/macro-assembler-mips.h" 9 #include "src/mips/macro-assembler-mips.h"
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 // Restore registers. 1207 // Restore registers.
1208 const RegList saves = descriptor->CalleeSavedRegisters(); 1208 const RegList saves = descriptor->CalleeSavedRegisters();
1209 if (saves != 0) { 1209 if (saves != 0) {
1210 __ MultiPop(saves); 1210 __ MultiPop(saves);
1211 } 1211 }
1212 } 1212 }
1213 __ mov(sp, fp); 1213 __ mov(sp, fp);
1214 __ Pop(ra, fp); 1214 __ Pop(ra, fp);
1215 __ Ret(); 1215 __ Ret();
1216 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { 1216 } else if (descriptor->IsJSFunctionCall() || needs_frame_) {
1217 __ mov(sp, fp); 1217 // Canonicalize JSFunction return sites for now.
1218 __ Pop(ra, fp); 1218 if (return_label_.is_bound()) {
1219 int pop_count = descriptor->IsJSFunctionCall() 1219 __ Branch(&return_label_);
1220 ? static_cast<int>(descriptor->JSParameterCount()) 1220 } else {
1221 : 0; 1221 __ bind(&return_label_);
1222 __ DropAndRet(pop_count); 1222 __ mov(sp, fp);
1223 __ Pop(ra, fp);
1224 int pop_count = descriptor->IsJSFunctionCall()
1225 ? static_cast<int>(descriptor->JSParameterCount())
1226 : 0;
1227 __ DropAndRet(pop_count);
1228 }
1223 } else { 1229 } else {
1224 __ Ret(); 1230 __ Ret();
1225 } 1231 }
1226 } 1232 }
1227 1233
1228 1234
1229 void CodeGenerator::AssembleMove(InstructionOperand* source, 1235 void CodeGenerator::AssembleMove(InstructionOperand* source,
1230 InstructionOperand* destination) { 1236 InstructionOperand* destination) {
1231 MipsOperandConverter g(this, NULL); 1237 MipsOperandConverter g(this, NULL);
1232 // Dispatch on the source and destination operand kinds. Not all 1238 // Dispatch on the source and destination operand kinds. Not all
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 } 1436 }
1431 } 1437 }
1432 } 1438 }
1433 } 1439 }
1434 1440
1435 #undef __ 1441 #undef __
1436 1442
1437 } // namespace compiler 1443 } // namespace compiler
1438 } // namespace internal 1444 } // namespace internal
1439 } // namespace v8 1445 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/code-generator-mips.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698