Commit 163ef099 authored by mbrandy's avatar mbrandy Committed by Commit bot

PPC: [turbofan] Add an operator to access the parent frame pointer

Port fd8fd05c

Original commit message:
    This functionality is useful for stubs that need to walk the stack. The new
    machine operator, LoadParentFramePointer dosn't force the currently compiling
    method to have a frame in contrast to LoadFramePointer. Instead, it adapts
    accordingly when frame elision is possible, making efficient stack walks
    possible without incurring a performance penalty for small stubs that can
    benefit from frame elision.

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

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

Cr-Commit-Position: refs/heads/master@{#34049}
parent 6357ad84
......@@ -821,6 +821,13 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
__ mr(i.OutputRegister(), fp);
DCHECK_EQ(LeaveRC, i.OutputRCBit());
break;
case kArchParentFramePointer:
if (frame_access_state()->frame()->needs_frame()) {
__ LoadP(i.OutputRegister(), MemOperand(fp, 0));
} else {
__ mr(i.OutputRegister(), fp);
}
break;
case kArchTruncateDoubleToI:
// TODO(mbrandy): move slow call to stub out of line.
__ TruncateDoubleToI(i.OutputRegister(), i.InputDoubleRegister(0));
......
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