| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_S390 | 5 #if V8_TARGET_ARCH_S390 |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 // Store resume mode into generator object. | 747 // Store resume mode into generator object. |
| 748 __ StoreP(r4, FieldMemOperand(r3, JSGeneratorObject::kResumeModeOffset)); | 748 __ StoreP(r4, FieldMemOperand(r3, JSGeneratorObject::kResumeModeOffset)); |
| 749 | 749 |
| 750 // Load suspended function and context. | 750 // Load suspended function and context. |
| 751 __ LoadP(cp, FieldMemOperand(r3, JSGeneratorObject::kContextOffset)); | 751 __ LoadP(cp, FieldMemOperand(r3, JSGeneratorObject::kContextOffset)); |
| 752 __ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset)); | 752 __ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset)); |
| 753 | 753 |
| 754 // Flood function if we are stepping. | 754 // Flood function if we are stepping. |
| 755 Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator; | 755 Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator; |
| 756 Label stepping_prepared; | 756 Label stepping_prepared; |
| 757 ExternalReference last_step_action = | 757 ExternalReference debug_hook = |
| 758 ExternalReference::debug_last_step_action_address(masm->isolate()); | 758 ExternalReference::debug_hook_on_function_call_address(masm->isolate()); |
| 759 STATIC_ASSERT(StepFrame > StepIn); | 759 __ mov(ip, Operand(debug_hook)); |
| 760 __ mov(ip, Operand(last_step_action)); | |
| 761 __ LoadB(ip, MemOperand(ip)); | 760 __ LoadB(ip, MemOperand(ip)); |
| 762 __ CmpP(ip, Operand(StepIn)); | 761 __ CmpSmiLiteral(ip, Smi::kZero, r0); |
| 763 __ bge(&prepare_step_in_if_stepping); | 762 __ bne(&prepare_step_in_if_stepping); |
| 764 | 763 |
| 765 // Flood function if we need to continue stepping in the suspended generator. | 764 // Flood function if we need to continue stepping in the suspended generator. |
| 766 | 765 |
| 767 ExternalReference debug_suspended_generator = | 766 ExternalReference debug_suspended_generator = |
| 768 ExternalReference::debug_suspended_generator_address(masm->isolate()); | 767 ExternalReference::debug_suspended_generator_address(masm->isolate()); |
| 769 | 768 |
| 770 __ mov(ip, Operand(debug_suspended_generator)); | 769 __ mov(ip, Operand(debug_suspended_generator)); |
| 771 __ LoadP(ip, MemOperand(ip)); | 770 __ LoadP(ip, MemOperand(ip)); |
| 772 __ CmpP(ip, r3); | 771 __ CmpP(ip, r3); |
| 773 __ beq(&prepare_step_in_suspended_generator); | 772 __ beq(&prepare_step_in_suspended_generator); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 __ LoadRR(r5, r3); | 825 __ LoadRR(r5, r3); |
| 827 __ LoadRR(r3, r6); | 826 __ LoadRR(r3, r6); |
| 828 __ LoadP(ip, FieldMemOperand(r3, JSFunction::kCodeEntryOffset)); | 827 __ LoadP(ip, FieldMemOperand(r3, JSFunction::kCodeEntryOffset)); |
| 829 __ JumpToJSEntry(ip); | 828 __ JumpToJSEntry(ip); |
| 830 } | 829 } |
| 831 | 830 |
| 832 __ bind(&prepare_step_in_if_stepping); | 831 __ bind(&prepare_step_in_if_stepping); |
| 833 { | 832 { |
| 834 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 833 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 835 __ Push(r3, r4, r6); | 834 __ Push(r3, r4, r6); |
| 836 __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); | 835 __ CallRuntime(Runtime::kDebugOnFunctionCall); |
| 837 __ Pop(r3, r4); | 836 __ Pop(r3, r4); |
| 838 __ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset)); | 837 __ LoadP(r6, FieldMemOperand(r3, JSGeneratorObject::kFunctionOffset)); |
| 839 } | 838 } |
| 840 __ b(&stepping_prepared); | 839 __ b(&stepping_prepared); |
| 841 | 840 |
| 842 __ bind(&prepare_step_in_suspended_generator); | 841 __ bind(&prepare_step_in_suspended_generator); |
| 843 { | 842 { |
| 844 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 843 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 845 __ Push(r3, r4); | 844 __ Push(r3, r4); |
| 846 __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); | 845 __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); |
| (...skipping 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2985 __ bkpt(0); | 2984 __ bkpt(0); |
| 2986 } | 2985 } |
| 2987 } | 2986 } |
| 2988 | 2987 |
| 2989 #undef __ | 2988 #undef __ |
| 2990 | 2989 |
| 2991 } // namespace internal | 2990 } // namespace internal |
| 2992 } // namespace v8 | 2991 } // namespace v8 |
| 2993 | 2992 |
| 2994 #endif // V8_TARGET_ARCH_S390 | 2993 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |