PPC: [interpreter] Fix return address when entering exception handler.

Port ca51c204e1

Original commit message:
    This fixes the broken return address when the exception handler within
    interpreted bytecode is being entered via stack unwinding. The address
    in question will never actually be taken, but our stack walker uses this
    address to determine whether a frame is interpreted.

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
TEST=cctest/test-interpreter/InterpreterTryCatch
BUG=v8:4674
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33471}
This commit is contained in:
mbrandy 2016-01-22 08:21:06 -08:00 committed by Commit bot
parent 380f8c8f46
commit 35dfeb2cfd

View File

@ -1136,6 +1136,14 @@ void Builtins::Generate_InterpreterNotifyLazyDeoptimized(MacroAssembler* masm) {
void Builtins::Generate_InterpreterEnterExceptionHandler(MacroAssembler* masm) {
// Set the address of the interpreter entry trampoline as a return address.
// This simulates the initial call to bytecode handlers in interpreter entry
// trampoline. The return will never actually be taken, but our stack walker
// uses this address to determine whether a frame is interpreted.
__ mov(r0,
Operand(masm->isolate()->builtins()->InterpreterEntryTrampoline()));
__ mtlr(r0);
Generate_EnterBytecodeDispatch(masm);
}