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