OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // jumping to the target address intended by the caller and that was | 102 // jumping to the target address intended by the caller and that was |
103 // overwritten by the address of DebugBreakXXX. | 103 // overwritten by the address of DebugBreakXXX. |
104 ExternalReference after_break_target = | 104 ExternalReference after_break_target = |
105 ExternalReference::debug_after_break_target_address(masm->isolate()); | 105 ExternalReference::debug_after_break_target_address(masm->isolate()); |
106 __ li(t9, Operand(after_break_target)); | 106 __ li(t9, Operand(after_break_target)); |
107 __ lw(t9, MemOperand(t9)); | 107 __ lw(t9, MemOperand(t9)); |
108 __ Jump(t9); | 108 __ Jump(t9); |
109 } | 109 } |
110 | 110 |
111 | 111 |
| 112 void DebugCodegen::GeneratePlainReturnLiveEdit(MacroAssembler* masm) { |
| 113 __ Ret(); |
| 114 } |
| 115 |
| 116 |
112 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 117 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
| 118 ExternalReference restarter_frame_function_slot = |
| 119 ExternalReference::debug_restarter_frame_function_pointer_address( |
| 120 masm->isolate()); |
| 121 __ li(at, Operand(restarter_frame_function_slot)); |
| 122 __ sw(zero_reg, MemOperand(at, 0)); |
| 123 |
113 // We do not know our frame height, but set sp based on fp. | 124 // We do not know our frame height, but set sp based on fp. |
114 __ Subu(sp, fp, Operand(kPointerSize)); | 125 __ Subu(sp, fp, Operand(kPointerSize)); |
115 | 126 |
116 __ Pop(a1); // Function. | 127 __ Pop(ra, fp, a1); // Return address, Frame, Function. |
117 | |
118 ParameterCount dummy(0); | |
119 __ FloodFunctionIfStepping(a1, no_reg, dummy, dummy); | |
120 | |
121 __ Pop(ra, fp); // Return address, Frame. | |
122 | 128 |
123 // Load context from the function. | 129 // Load context from the function. |
124 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); | 130 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
125 | 131 |
126 // Get function code. | 132 // Get function code. |
127 __ lw(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 133 __ lw(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
128 __ lw(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset)); | 134 __ lw(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset)); |
129 __ Addu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag)); | 135 __ Addu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag)); |
130 | 136 |
131 // Re-run JSFunction, a1 is function, cp is context. | 137 // Re-run JSFunction, a1 is function, cp is context. |
132 __ Jump(t9); | 138 __ Jump(t9); |
133 } | 139 } |
134 | 140 |
135 | 141 |
136 const bool LiveEdit::kFrameDropperSupported = true; | 142 const bool LiveEdit::kFrameDropperSupported = true; |
137 | 143 |
138 #undef __ | 144 #undef __ |
139 | 145 |
140 } // namespace internal | 146 } // namespace internal |
141 } // namespace v8 | 147 } // namespace v8 |
142 | 148 |
143 #endif // V8_TARGET_ARCH_MIPS | 149 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |