Commit a0d2f240 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: [Interpreter] Changes GenerateDoubleToObject to push and pop rsi value.

  port e6b6e554 (r35163)

  original commit message:
  In the earlier implementation of GenerateDoubleToObject the context
  is loaded from the parent's frame. rsi is clobbered because it is used
  to store kHoleNan constnat. It is not always safe to peek at
  the parents frame. Bytecode handlers have TypedFrame and the type of
  frame is stored at FP + 1. GenerateDoubleToObject expects context
  to be store at that place. In the current implementation rsi is pushed
  onto the stack and is popped when exiting this function.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#35478}
parent 35395d98
......@@ -381,6 +381,7 @@ void ElementsTransitionGenerator::GenerateDoubleToObject(
__ cmp(edi, Immediate(masm->isolate()->factory()->empty_fixed_array()));
__ j(equal, &only_change_map);
__ push(esi);
__ push(eax);
__ push(edx);
__ push(ebx);
......@@ -425,10 +426,10 @@ void ElementsTransitionGenerator::GenerateDoubleToObject(
// Call into runtime if GC is required.
__ bind(&gc_required);
__ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
__ pop(ebx);
__ pop(edx);
__ pop(eax);
__ pop(esi);
__ jmp(fail);
// Box doubles into heap numbers.
......@@ -477,7 +478,7 @@ void ElementsTransitionGenerator::GenerateDoubleToObject(
// Restore registers.
__ pop(eax);
__ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
__ pop(esi);
__ bind(&success);
}
......
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