Commit c304d414 authored by jyan's avatar jyan Committed by Commit bot

S390: [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, bjaideep@ca.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2069193003
Cr-Commit-Position: refs/heads/master@{#37014}
parent 70d83fbd
...@@ -710,12 +710,13 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { ...@@ -710,12 +710,13 @@ 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);
__ LoadlB(ip, MemOperand(ip)); __ mov(ip, Operand(last_step_action));
__ CmpP(ip, Operand::Zero()); __ LoadB(ip, MemOperand(ip));
__ bne(&prepare_step_in_if_stepping); __ CmpP(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.
......
...@@ -1309,12 +1309,13 @@ void MacroAssembler::FloodFunctionIfStepping(Register fun, Register new_target, ...@@ -1309,12 +1309,13 @@ 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(r6, Operand(step_in_enabled)); STATIC_ASSERT(StepFrame > StepIn);
LoadlB(r6, MemOperand(r6)); mov(r6, Operand(last_step_action));
CmpP(r6, Operand::Zero()); LoadB(r6, MemOperand(r6));
beq(&skip_flooding); CmpP(r6, 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