32 #if V8_TARGET_ARCH_MIPS
40 #ifdef ENABLE_DEBUGGER_SUPPORT
42 bool BreakLocationIterator::IsDebugBreakAtReturn() {
43 return Debug::IsDebugBreakAtReturn(rinfo());
47 void BreakLocationIterator::SetDebugBreakAtReturn() {
61 patcher.masm()->li(v8::internal::t9,
62 Operand(reinterpret_cast<int32_t>(
63 debug_info_->GetIsolate()->debug()->debug_break_return()->entry())));
64 patcher.masm()->Call(v8::internal::t9);
65 patcher.masm()->nop();
66 patcher.masm()->nop();
67 patcher.masm()->nop();
75 void BreakLocationIterator::ClearDebugBreakAtReturn() {
76 rinfo()->PatchCode(original_rinfo()->
pc(),
83 bool Debug::IsDebugBreakAtReturn(RelocInfo* rinfo) {
84 ASSERT(RelocInfo::IsJSReturn(rinfo->rmode()));
85 return rinfo->IsPatchedReturnSequence();
89 bool BreakLocationIterator::IsDebugBreakAtSlot() {
90 ASSERT(IsDebugBreakSlot());
92 return rinfo()->IsPatchedDebugBreakSlotSequence();
96 void BreakLocationIterator::SetDebugBreakAtSlot() {
97 ASSERT(IsDebugBreakSlot());
107 patcher.masm()->li(v8::internal::t9, Operand(reinterpret_cast<int32_t>(
108 debug_info_->GetIsolate()->debug()->debug_break_slot()->entry())));
109 patcher.masm()->Call(v8::internal::t9);
113 void BreakLocationIterator::ClearDebugBreakAtSlot() {
114 ASSERT(IsDebugBreakSlot());
115 rinfo()->PatchCode(original_rinfo()->
pc(),
119 const bool Debug::FramePaddingLayout::kIsSupported =
false;
122 #define __ ACCESS_MASM(masm)
126 static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
137 ASSERT((object_regs & non_object_regs) == 0);
138 if ((object_regs | non_object_regs) != 0) {
141 Register reg = { r };
142 if ((non_object_regs & (1 << r)) != 0) {
143 if (FLAG_debug_code) {
144 __ And(at, reg, 0xc0000000);
145 __ Assert(
eq, kUnableToEncodeValueAsSmi, at, Operand(zero_reg));
150 __ MultiPush(object_regs | non_object_regs);
154 __ RecordComment(
"// Calling from debug break to runtime - come in - over");
156 __ PrepareCEntryArgs(0);
157 __ PrepareCEntryFunction(ExternalReference::debug_break(masm->isolate()));
163 if ((object_regs | non_object_regs) != 0) {
164 __ MultiPop(object_regs | non_object_regs);
167 Register reg = { r };
168 if ((non_object_regs & (1 << r)) != 0) {
171 if (FLAG_debug_code &&
172 (((object_regs |non_object_regs) & (1 << r)) == 0)) {
185 ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate())));
191 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) {
201 Generate_DebugBreakCallHelper(masm, a0.bit() | a2.bit(), 0);
205 void Debug::GenerateStoreICDebugBreak(MacroAssembler* masm) {
215 Generate_DebugBreakCallHelper(masm, a0.bit() | a1.bit() | a2.bit(), 0);
219 void Debug::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
224 Generate_DebugBreakCallHelper(masm, a0.bit() | a1.bit(), 0);
228 void Debug::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
234 Generate_DebugBreakCallHelper(masm, a0.bit() | a1.bit() | a2.bit(), 0);
238 void Debug::GenerateCompareNilICDebugBreak(MacroAssembler* masm) {
243 Generate_DebugBreakCallHelper(masm, a0.bit(), 0);
247 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) {
252 Generate_DebugBreakCallHelper(masm, a2.bit(), 0);
256 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) {
260 Generate_DebugBreakCallHelper(masm, v0.bit(), 0);
264 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) {
269 Generate_DebugBreakCallHelper(masm, a1.bit(), 0);
273 void Debug::GenerateCallFunctionStubRecordDebugBreak(MacroAssembler* masm) {
280 Generate_DebugBreakCallHelper(masm, a1.bit() | a2.bit() | a3.bit(), 0);
284 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) {
290 Generate_DebugBreakCallHelper(masm, a1.bit() , a0.bit());
294 void Debug::GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm) {
302 Generate_DebugBreakCallHelper(masm, a1.bit() | a2.bit() | a3.bit(), a0.bit());
306 void Debug::GenerateSlot(MacroAssembler* masm) {
310 Label check_codesize;
311 __ bind(&check_codesize);
312 __ RecordDebugBreakSlot();
316 ASSERT_EQ(Assembler::kDebugBreakSlotInstructions,
317 masm->InstructionsGeneratedSince(&check_codesize));
321 void Debug::GenerateSlotDebugBreak(MacroAssembler* masm) {
324 Generate_DebugBreakCallHelper(masm, 0, 0);
328 void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
329 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnMips);
333 void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
334 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnMips);
338 const bool Debug::kFrameDropperSupported =
false;
343 #endif // ENABLE_DEBUGGER_SUPPORT
347 #endif // V8_TARGET_ARCH_MIPS
static const int kDebugBreakSlotInstructions
#define ASSERT(condition)
const RegList kJSCallerSaved
int JSCallerSavedCode(int n)
const int kNumJSCallerSaved
friend class BlockTrampolinePoolScope
#define ASSERT_EQ(v1, v2)
static const int kJSReturnSequenceInstructions
const uint32_t kDebugZapValue