Commit 02072112 authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[Interpreter] Fix some issues in the non-x64 InterpreterNotifyDeoptimized builtins.

Fix stack push issues on non-x64 platforms for
InterpreterNotifyDeoptimized builtins.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33088}
parent 258c6129
...@@ -968,12 +968,8 @@ static void Generate_InterpreterNotifyDeoptimizedHelper( ...@@ -968,12 +968,8 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// Tear down internal frame. // Tear down internal frame.
} }
// Drop state (we don't use these for interpreter deopts) and push PC at top // Drop state (we don't use this for interpreter deopts).
// of stack (to simulate initial call to bytecode handler in interpreter entry
// trampoline).
__ pop(r1);
__ Drop(1); __ Drop(1);
__ push(r1);
// Initialize register file register and dispatch table register. // Initialize register file register and dispatch table register.
__ add(kInterpreterRegisterFileRegister, fp, __ add(kInterpreterRegisterFileRegister, fp,
......
...@@ -927,12 +927,8 @@ static void Generate_InterpreterNotifyDeoptimizedHelper( ...@@ -927,12 +927,8 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// Tear down internal frame. // Tear down internal frame.
} }
// Drop state (we don't use these for interpreter deopts) and push PC at top // Drop state (we don't use this for interpreter deopts).
// of stack (to simulate initial call to bytecode handler in interpreter entry
// trampoline).
__ Pop(x1);
__ Drop(1); __ Drop(1);
__ Push(x1);
// Initialize register file register and dispatch table register. // Initialize register file register and dispatch table register.
__ Add(kInterpreterRegisterFileRegister, fp, __ Add(kInterpreterRegisterFileRegister, fp,
...@@ -942,7 +938,6 @@ static void Generate_InterpreterNotifyDeoptimizedHelper( ...@@ -942,7 +938,6 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
__ Add(kInterpreterDispatchTableRegister, kInterpreterDispatchTableRegister, __ Add(kInterpreterDispatchTableRegister, kInterpreterDispatchTableRegister,
Operand(FixedArray::kHeaderSize - kHeapObjectTag)); Operand(FixedArray::kHeaderSize - kHeapObjectTag));
// Get the context from the frame. // Get the context from the frame.
// TODO(rmcilroy): Update interpreter frame to expect current context at the // TODO(rmcilroy): Update interpreter frame to expect current context at the
// context slot instead of the function context. // context slot instead of the function context.
......
...@@ -787,7 +787,7 @@ static void Generate_InterpreterNotifyDeoptimizedHelper( ...@@ -787,7 +787,7 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
__ LoadRoot(ebx, Heap::kInterpreterTableRootIndex); __ LoadRoot(ebx, Heap::kInterpreterTableRootIndex);
__ add(ebx, Immediate(FixedArray::kHeaderSize - kHeapObjectTag)); __ add(ebx, Immediate(FixedArray::kHeaderSize - kHeapObjectTag));
DCHECK_EQ(-1, kInterpreterDispatchTableSpillSlot); DCHECK_EQ(-1, kInterpreterDispatchTableSpillSlot);
__ mov(ebx, Operand(esp, -2 * kPointerSize)); __ mov(Operand(esp, kPointerSize), ebx);
// Dispatch to the target bytecode. // Dispatch to the target bytecode.
__ movzx_b(esi, Operand(kInterpreterBytecodeArrayRegister, __ movzx_b(esi, Operand(kInterpreterBytecodeArrayRegister,
......
...@@ -964,12 +964,8 @@ static void Generate_InterpreterNotifyDeoptimizedHelper( ...@@ -964,12 +964,8 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// Tear down internal frame. // Tear down internal frame.
} }
// Drop state (we don't use these for interpreter deopts) and push PC at top // Drop state (we don't use this for interpreter deopts).
// of stack (to simulate initial call to bytecode handler in interpreter entry
// trampoline).
__ lw(a1, MemOperand(sp));
__ Drop(1); __ Drop(1);
__ sw(a1, MemOperand(sp));
// Initialize register file register and dispatch table register. // Initialize register file register and dispatch table register.
__ Addu(kInterpreterRegisterFileRegister, fp, __ Addu(kInterpreterRegisterFileRegister, fp,
......
...@@ -955,12 +955,8 @@ static void Generate_InterpreterNotifyDeoptimizedHelper( ...@@ -955,12 +955,8 @@ static void Generate_InterpreterNotifyDeoptimizedHelper(
// Tear down internal frame. // Tear down internal frame.
} }
// Drop state (we don't use these for interpreter deopts) and push PC at top // Drop state (we don't use this for interpreter deopts).
// of stack (to simulate initial call to bytecode handler in interpreter entry
// trampoline).
__ ld(a1, MemOperand(sp));
__ Drop(1); __ Drop(1);
__ sd(a1, MemOperand(sp));
// Initialize register file register and dispatch table register. // Initialize register file register and dispatch table register.
__ Daddu(kInterpreterRegisterFileRegister, fp, __ Daddu(kInterpreterRegisterFileRegister, fp,
......
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