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) {
// 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));
__ LoadlB(ip, MemOperand(ip));
__ CmpP(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));
__ LoadB(ip, MemOperand(ip));
__ CmpP(ip, Operand(StepIn));
__ bge(&prepare_step_in_if_stepping);
// Flood function if we need to continue stepping in the suspended generator.
......
......@@ -1309,12 +1309,13 @@ 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(r6, Operand(step_in_enabled));
LoadlB(r6, MemOperand(r6));
CmpP(r6, Operand::Zero());
beq(&skip_flooding);
ExternalReference last_step_action =
ExternalReference::debug_last_step_action_address(isolate());
STATIC_ASSERT(StepFrame > StepIn);
mov(r6, Operand(last_step_action));
LoadB(r6, MemOperand(r6));
CmpP(r6, 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