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

PPC: [Interpreter] Save and restore dispatch table pointer during calls.

Port a2935d63

Original commmit message:
    Saves and restores the dispatch pointer during calls to enable the debugger to
    switch the dispatch table used by a function during it's execution.

    Also moves the accumulator and context nodes to be Variables so that they will
    be properly merged across branches.

R=rmcilroy@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4280,v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33962}
parent 1003785c
......@@ -977,15 +977,12 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
FrameScope frame_scope(masm, StackFrame::MANUAL);
__ PushFixedFrame(r4);
__ addi(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
__ push(r6);
// Push dispatch table pointer.
__ mov(r3, Operand(ExternalReference::interpreter_dispatch_table_address(
masm->isolate())));
__ push(r3);
// Push zero for bytecode array offset.
// Push new.target, dispatch table pointer and zero for bytecode array offset.
__ li(r3, Operand::Zero());
__ push(r3);
__ mov(r5, Operand(ExternalReference::interpreter_dispatch_table_address(
masm->isolate())));
__ Push(r6, r5, r3);
// Get the bytecode array from the function object and load the pointer to the
// first entry into kInterpreterBytecodeRegister.
......@@ -1043,7 +1040,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
Operand(InterpreterFrameConstants::kRegisterFilePointerFromFp));
__ mov(kInterpreterBytecodeOffsetRegister,
Operand(BytecodeArray::kHeaderSize - kHeapObjectTag));
__ lwz(kInterpreterDispatchTableRegister,
__ LoadP(kInterpreterDispatchTableRegister,
MemOperand(fp, InterpreterFrameConstants::kDispatchTableFromFp));
// Dispatch to the first bytecode handler for the function.
......
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