Commit 85bef237 authored by bjaideep's avatar bjaideep Committed by Commit bot

PPC: [debugger] simplify debug stepping.

Port 3e2d60d8

R=yangguo@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2065423002
Cr-Commit-Position: refs/heads/master@{#37007}
parent b6aa77d9
......@@ -722,12 +722,14 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// Flood function if we are stepping.
Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator;
Label stepping_prepared;
ExternalReference step_in_enabled =
ExternalReference::debug_step_in_enabled_address(masm->isolate());
__ mov(ip, Operand(step_in_enabled));
__ lbz(ip, MemOperand(ip));
__ cmpi(ip, Operand::Zero());
__ bne(&prepare_step_in_if_stepping);
ExternalReference last_step_action =
ExternalReference::debug_last_step_action_address(masm->isolate());
STATIC_ASSERT(StepFrame > StepIn);
__ mov(ip, Operand(last_step_action));
__ LoadByte(ip, MemOperand(ip), r0);
__ extsb(ip, ip);
__ cmpi(ip, Operand(StepIn));
__ bge(&prepare_step_in_if_stepping);
// Flood function if we need to continue stepping in the suspended generator.
......
......@@ -1386,12 +1386,14 @@ void MacroAssembler::FloodFunctionIfStepping(Register fun, Register new_target,
const ParameterCount& expected,
const ParameterCount& actual) {
Label skip_flooding;
ExternalReference step_in_enabled =
ExternalReference::debug_step_in_enabled_address(isolate());
mov(r7, Operand(step_in_enabled));
lbz(r7, MemOperand(r7));
cmpi(r7, Operand::Zero());
beq(&skip_flooding);
ExternalReference last_step_action =
ExternalReference::debug_last_step_action_address(isolate());
STATIC_ASSERT(StepFrame > StepIn);
mov(r7, Operand(last_step_action));
LoadByte(r7, MemOperand(r7), r0);
extsb(r7, r7);
cmpi(r7, Operand(StepIn));
blt(&skip_flooding);
{
FrameScope frame(this,
has_frame() ? StackFrame::NONE : StackFrame::INTERNAL);
......
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