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