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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 ExternalReference after_break_target = | 109 ExternalReference after_break_target = |
110 ExternalReference::debug_after_break_target_address(masm->isolate()); | 110 ExternalReference::debug_after_break_target_address(masm->isolate()); |
111 __ li(t9, Operand(after_break_target)); | 111 __ li(t9, Operand(after_break_target)); |
112 __ ld(t9, MemOperand(t9)); | 112 __ ld(t9, MemOperand(t9)); |
113 __ Jump(t9); | 113 __ Jump(t9); |
114 } | 114 } |
115 | 115 |
116 | 116 |
117 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 117 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
118 // We do not know our frame height, but set sp based on fp. | 118 // We do not know our frame height, but set sp based on fp. |
119 __ Dsubu(sp, fp, Operand(kPointerSize)); | 119 __ ld(a1, MemOperand(fp, FrameDropperFrameConstants::kFunctionOffset)); |
120 | 120 |
121 __ Pop(ra, fp, a1); // Return address, Frame, Function. | 121 // Pop return address and frame. |
| 122 __ LeaveFrame(StackFrame::INTERNAL); |
122 | 123 |
123 ParameterCount dummy(0); | 124 ParameterCount dummy(0); |
124 __ FloodFunctionIfStepping(a1, no_reg, dummy, dummy); | 125 __ FloodFunctionIfStepping(a1, no_reg, dummy, dummy); |
125 | 126 |
126 // Load context from the function. | 127 // Load context from the function. |
127 __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); | 128 __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
128 | 129 |
129 // Clear new.target as a safety measure. | 130 // Clear new.target as a safety measure. |
130 __ LoadRoot(a3, Heap::kUndefinedValueRootIndex); | 131 __ LoadRoot(a3, Heap::kUndefinedValueRootIndex); |
131 | 132 |
132 // Get function code. | 133 // Get function code. |
133 __ ld(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 134 __ ld(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
134 __ ld(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset)); | 135 __ ld(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset)); |
135 __ Daddu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag)); | 136 __ Daddu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag)); |
136 | 137 |
137 // Re-run JSFunction, a1 is function, cp is context. | 138 // Re-run JSFunction, a1 is function, cp is context. |
138 __ Jump(t9); | 139 __ Jump(t9); |
139 } | 140 } |
140 | 141 |
141 | 142 |
142 const bool LiveEdit::kFrameDropperSupported = true; | 143 const bool LiveEdit::kFrameDropperSupported = true; |
143 | 144 |
144 #undef __ | 145 #undef __ |
145 | 146 |
146 } // namespace internal | 147 } // namespace internal |
147 } // namespace v8 | 148 } // namespace v8 |
148 | 149 |
149 #endif // V8_TARGET_ARCH_MIPS64 | 150 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |