Commit 9727ab7e authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

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

  port fd8fd05c (r34014)

  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.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34064}
parent f9cdf9d4
......@@ -574,6 +574,13 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
case kArchStackPointer:
__ mov(i.OutputRegister(), esp);
break;
case kArchParentFramePointer:
if (frame_access_state()->frame()->needs_frame()) {
__ mov(i.OutputRegister(), Operand(ebp, 0));
} else {
__ mov(i.OutputRegister(), ebp);
}
break;
case kArchTruncateDoubleToI: {
if (!instr->InputAt(0)->IsDoubleRegister()) {
__ fld_d(i.InputOperand(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