32 #if defined(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 Isolate::Current()->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 Isolate::Current()->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);
146 eq,
"Unable to encode value as smi", at, Operand(zero_reg));
151 __ MultiPush(object_regs | non_object_regs);
155 __ RecordComment(
"// Calling from debug break to runtime - come in - over");
157 __ PrepareCEntryArgs(0);
158 __ PrepareCEntryFunction(ExternalReference::debug_break(masm->isolate()));
164 if ((object_regs | non_object_regs) != 0) {
165 __ MultiPop(object_regs | non_object_regs);
168 Register reg = { r };
169 if ((non_object_regs & (1 << r)) != 0) {
172 if (FLAG_debug_code &&
173 (((object_regs |non_object_regs) & (1 << r)) == 0)) {
186 ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate())));
192 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) {
202 Generate_DebugBreakCallHelper(masm, a0.bit() | a2.bit(), 0);
206 void Debug::GenerateStoreICDebugBreak(MacroAssembler* masm) {
216 Generate_DebugBreakCallHelper(masm, a0.bit() | a1.bit() | a2.bit(), 0);
220 void Debug::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
225 Generate_DebugBreakCallHelper(masm, a0.bit() | a1.bit(), 0);
229 void Debug::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
235 Generate_DebugBreakCallHelper(masm, a0.bit() | a1.bit() | a2.bit(), 0);
239 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) {
244 Generate_DebugBreakCallHelper(masm, a2.bit(), 0);
248 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) {
252 Generate_DebugBreakCallHelper(masm, v0.bit(), 0);
256 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) {
261 Generate_DebugBreakCallHelper(masm, a1.bit(), 0);
265 void Debug::GenerateCallFunctionStubRecordDebugBreak(MacroAssembler* masm) {
271 Generate_DebugBreakCallHelper(masm, a1.bit() | a2.bit(), 0);
275 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) {
281 Generate_DebugBreakCallHelper(masm, a1.bit() , a0.bit());
285 void Debug::GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm) {
292 Generate_DebugBreakCallHelper(masm, a1.bit() | a2.bit(), a0.bit());
296 void Debug::GenerateSlot(MacroAssembler* masm) {
300 Label check_codesize;
301 __ bind(&check_codesize);
302 __ RecordDebugBreakSlot();
306 ASSERT_EQ(Assembler::kDebugBreakSlotInstructions,
307 masm->InstructionsGeneratedSince(&check_codesize));
311 void Debug::GenerateSlotDebugBreak(MacroAssembler* masm) {
314 Generate_DebugBreakCallHelper(masm, 0, 0);
318 void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
319 masm->Abort(
"LiveEdit frame dropping is not supported on mips");
323 void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
324 masm->Abort(
"LiveEdit frame dropping is not supported on mips");
328 const bool Debug::kFrameDropperSupported =
false;
333 #endif // ENABLE_DEBUGGER_SUPPORT
337 #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