Commit e81c410c authored by bjaideep's avatar bjaideep Committed by Commit bot

PPC/s390: [builtins]: Uniformly push argument count in TF-generated builtins

Port 4447405b

R=danno@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2474023002
Cr-Commit-Position: refs/heads/master@{#40731}
parent fb7841b3
......@@ -2129,6 +2129,9 @@ void CodeGenerator::AssembleConstructFrame() {
}
} else if (descriptor->IsJSFunctionCall()) {
__ Prologue(this->info()->GeneratePreagedPrologue(), ip);
if (descriptor->PushArgumentCount()) {
__ Push(kJavaScriptCallArgCountRegister);
}
} else {
StackFrame::Type type = info()->GetOutputStackFrameType();
// TODO(mbrandy): Detect cases where ip is the entrypoint (for
......@@ -2137,7 +2140,8 @@ void CodeGenerator::AssembleConstructFrame() {
}
}
int shrink_slots = frame()->GetSpillSlotCount();
int shrink_slots =
frame()->GetTotalFrameSlotCount() - descriptor->CalculateFixedFrameSize();
if (info()->is_osr()) {
// TurboFan OSR-compiled functions cannot be entered directly.
__ Abort(kShouldNotDirectlyEnterOsrFunction);
......
......@@ -2256,6 +2256,9 @@ void CodeGenerator::AssembleConstructFrame() {
__ LoadRR(fp, sp);
} else if (descriptor->IsJSFunctionCall()) {
__ Prologue(this->info()->GeneratePreagedPrologue(), ip);
if (descriptor->PushArgumentCount()) {
__ Push(kJavaScriptCallArgCountRegister);
}
} else {
StackFrame::Type type = info()->GetOutputStackFrameType();
// TODO(mbrandy): Detect cases where ip is the entrypoint (for
......@@ -2264,7 +2267,8 @@ void CodeGenerator::AssembleConstructFrame() {
}
}
int shrink_slots = frame()->GetSpillSlotCount();
int shrink_slots =
frame()->GetTotalFrameSlotCount() - descriptor->CalculateFixedFrameSize();
if (info()->is_osr()) {
// TurboFan OSR-compiled functions cannot be entered directly.
__ Abort(kShouldNotDirectlyEnterOsrFunction);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment