Commit e53f736d authored by mbrandy's avatar mbrandy Committed by Commit bot

PPC: [turbofan] Fewer gap moves for tail calls

Port 51e992f1

Original commit message:
    Restore frame pointer directly from stack rather than copying it and
    restoring. Also restore return address register directly on platforms that
    support it.

R=danno@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4076
LOG=n

Review URL: https://codereview.chromium.org/1490563002

Cr-Commit-Position: refs/heads/master@{#32422}
parent 813ad56d
...@@ -610,14 +610,6 @@ void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) { ...@@ -610,14 +610,6 @@ void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) {
if (sp_slot_delta > 0) { if (sp_slot_delta > 0) {
__ Add(sp, sp, sp_slot_delta * kPointerSize, r0); __ Add(sp, sp, sp_slot_delta * kPointerSize, r0);
} }
if (frame()->needs_frame()) {
if (FLAG_enable_embedded_constant_pool) {
__ Pop(r0, fp, kConstantPoolRegister);
} else {
__ Pop(r0, fp);
}
__ mtlr(r0);
}
frame_access_state()->SetFrameAccessToDefault(); frame_access_state()->SetFrameAccessToDefault();
} }
...@@ -628,6 +620,15 @@ void CodeGenerator::AssemblePrepareTailCall(int stack_param_delta) { ...@@ -628,6 +620,15 @@ void CodeGenerator::AssemblePrepareTailCall(int stack_param_delta) {
__ Add(sp, sp, sp_slot_delta * kPointerSize, r0); __ Add(sp, sp, sp_slot_delta * kPointerSize, r0);
frame_access_state()->IncreaseSPDelta(-sp_slot_delta); frame_access_state()->IncreaseSPDelta(-sp_slot_delta);
} }
if (frame()->needs_frame()) {
if (FLAG_enable_embedded_constant_pool) {
__ LoadP(kConstantPoolRegister,
MemOperand(fp, StandardFrameConstants::kConstantPoolOffset));
}
__ LoadP(r0, MemOperand(fp, StandardFrameConstants::kCallerPCOffset));
__ LoadP(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
__ mtlr(r0);
}
frame_access_state()->SetFrameAccessToSP(); frame_access_state()->SetFrameAccessToSP();
} }
......
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