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

Unified Diff: src/compiler/mips/code-generator-mips.cc

Issue 2473643002: Revert of [turbofan] Support variable size argument popping in TF-generated functions (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/mips/code-generator-mips.cc
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc
index 6c31a411b60ba98af6482ada57dccda27775fb5e..56c35287d39002cdacd29e79d4faeeb6d0457338 100644
--- a/src/compiler/mips/code-generator-mips.cc
+++ b/src/compiler/mips/code-generator-mips.cc
@@ -709,7 +709,7 @@
break;
}
case kArchRet:
- AssembleReturn(instr->InputAt(0));
+ AssembleReturn();
break;
case kArchStackPointer:
__ mov(i.OutputRegister(), sp);
@@ -1960,7 +1960,8 @@
}
}
-void CodeGenerator::AssembleReturn(InstructionOperand* pop) {
+
+void CodeGenerator::AssembleReturn() {
CallDescriptor* descriptor = linkage()->GetIncomingDescriptor();
int pop_count = static_cast<int>(descriptor->StackParameterCount());
@@ -1976,31 +1977,17 @@
__ MultiPopFPU(saves_fpu);
}
- MipsOperandConverter g(this, nullptr);
if (descriptor->IsCFunctionCall()) {
AssembleDeconstructFrame();
} else if (frame_access_state()->has_frame()) {
- // Canonicalize JSFunction return sites for now unless they have an variable
- // number of stack slot pops.
- if (pop->IsImmediate() && g.ToConstant(pop).ToInt32() == 0) {
- if (return_label_.is_bound()) {
- __ Branch(&return_label_);
- return;
- } else {
- __ bind(&return_label_);
- AssembleDeconstructFrame();
- }
+ // Canonicalize JSFunction return sites for now.
+ if (return_label_.is_bound()) {
+ __ Branch(&return_label_);
+ return;
} else {
+ __ bind(&return_label_);
AssembleDeconstructFrame();
}
- }
- if (pop->IsImmediate()) {
- DCHECK_EQ(Constant::kInt32, g.ToConstant(pop).type());
- pop_count += g.ToConstant(pop).ToInt32();
- } else {
- Register pop_reg = g.ToRegister(pop);
- __ sll(pop_reg, pop_reg, kPointerSizeLog2);
- __ Addu(sp, sp, Operand(pop_reg));
}
if (pop_count != 0) {
__ DropAndRet(pop_count);
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698