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 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "codegen.h" | 9 #include "codegen.h" |
10 #include "debug.h" | 10 #include "debug.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 // Now that the break point has been handled, resume normal execution by | 166 // Now that the break point has been handled, resume normal execution by |
167 // jumping to the target address intended by the caller and that was | 167 // jumping to the target address intended by the caller and that was |
168 // overwritten by the address of DebugBreakXXX. | 168 // overwritten by the address of DebugBreakXXX. |
169 ExternalReference after_break_target = | 169 ExternalReference after_break_target = |
170 ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate()); | 170 ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate()); |
171 __ jmp(Operand::StaticVariable(after_break_target)); | 171 __ jmp(Operand::StaticVariable(after_break_target)); |
172 } | 172 } |
173 | 173 |
174 | 174 |
| 175 void Debug::GenerateCallICStubDebugBreak(MacroAssembler* masm) { |
| 176 // Register state for CallICStub |
| 177 // ----------- S t a t e ------------- |
| 178 // -- edx : type feedback slot (smi) |
| 179 // -- edi : function |
| 180 // ----------------------------------- |
| 181 Generate_DebugBreakCallHelper(masm, edx.bit() | edi.bit(), |
| 182 0, false); |
| 183 } |
| 184 |
| 185 |
175 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) { | 186 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) { |
176 // Register state for IC load call (from ic-ia32.cc). | 187 // Register state for IC load call (from ic-ia32.cc). |
177 // ----------- S t a t e ------------- | 188 // ----------- S t a t e ------------- |
178 // -- ecx : name | 189 // -- ecx : name |
179 // -- edx : receiver | 190 // -- edx : receiver |
180 // ----------------------------------- | 191 // ----------------------------------- |
181 Generate_DebugBreakCallHelper(masm, ecx.bit() | edx.bit(), 0, false); | 192 Generate_DebugBreakCallHelper(masm, ecx.bit() | edx.bit(), 0, false); |
182 } | 193 } |
183 | 194 |
184 | 195 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 229 |
219 void Debug::GenerateCompareNilICDebugBreak(MacroAssembler* masm) { | 230 void Debug::GenerateCompareNilICDebugBreak(MacroAssembler* masm) { |
220 // Register state for CompareNil IC | 231 // Register state for CompareNil IC |
221 // ----------- S t a t e ------------- | 232 // ----------- S t a t e ------------- |
222 // -- eax : value | 233 // -- eax : value |
223 // ----------------------------------- | 234 // ----------------------------------- |
224 Generate_DebugBreakCallHelper(masm, eax.bit(), 0, false); | 235 Generate_DebugBreakCallHelper(masm, eax.bit(), 0, false); |
225 } | 236 } |
226 | 237 |
227 | 238 |
228 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) { | |
229 // Register state for keyed IC call call (from ic-ia32.cc) | |
230 // ----------- S t a t e ------------- | |
231 // -- ecx: name | |
232 // ----------------------------------- | |
233 Generate_DebugBreakCallHelper(masm, ecx.bit(), 0, false); | |
234 } | |
235 | |
236 | |
237 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { | 239 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { |
238 // Register state just before return from JS function (from codegen-ia32.cc). | 240 // Register state just before return from JS function (from codegen-ia32.cc). |
239 // ----------- S t a t e ------------- | 241 // ----------- S t a t e ------------- |
240 // -- eax: return value | 242 // -- eax: return value |
241 // ----------------------------------- | 243 // ----------------------------------- |
242 Generate_DebugBreakCallHelper(masm, eax.bit(), 0, true); | 244 Generate_DebugBreakCallHelper(masm, eax.bit(), 0, true); |
243 } | 245 } |
244 | 246 |
245 | 247 |
246 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { | 248 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { |
247 // Register state for CallFunctionStub (from code-stubs-ia32.cc). | 249 // Register state for CallFunctionStub (from code-stubs-ia32.cc). |
248 // ----------- S t a t e ------------- | 250 // ----------- S t a t e ------------- |
249 // -- edi: function | 251 // -- edi: function |
250 // ----------------------------------- | 252 // ----------------------------------- |
251 Generate_DebugBreakCallHelper(masm, edi.bit(), 0, false); | 253 Generate_DebugBreakCallHelper(masm, edi.bit(), 0, false); |
252 } | 254 } |
253 | 255 |
254 | 256 |
255 void Debug::GenerateCallFunctionStubRecordDebugBreak(MacroAssembler* masm) { | |
256 // Register state for CallFunctionStub (from code-stubs-ia32.cc). | |
257 // ----------- S t a t e ------------- | |
258 // -- ebx: feedback array | |
259 // -- edx: slot in feedback array | |
260 // -- edi: function | |
261 // ----------------------------------- | |
262 Generate_DebugBreakCallHelper(masm, ebx.bit() | edx.bit() | edi.bit(), | |
263 0, false); | |
264 } | |
265 | |
266 | |
267 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { | 257 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { |
268 // Register state for CallConstructStub (from code-stubs-ia32.cc). | 258 // Register state for CallConstructStub (from code-stubs-ia32.cc). |
269 // eax is the actual number of arguments not encoded as a smi see comment | 259 // eax is the actual number of arguments not encoded as a smi see comment |
270 // above IC call. | 260 // above IC call. |
271 // ----------- S t a t e ------------- | 261 // ----------- S t a t e ------------- |
272 // -- eax: number of arguments (not smi) | 262 // -- eax: number of arguments (not smi) |
273 // -- edi: constructor function | 263 // -- edi: constructor function |
274 // ----------------------------------- | 264 // ----------------------------------- |
275 // The number of arguments in eax is not smi encoded. | 265 // The number of arguments in eax is not smi encoded. |
276 Generate_DebugBreakCallHelper(masm, edi.bit(), eax.bit(), false); | 266 Generate_DebugBreakCallHelper(masm, edi.bit(), eax.bit(), false); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 __ jmp(edx); | 330 __ jmp(edx); |
341 } | 331 } |
342 | 332 |
343 const bool Debug::kFrameDropperSupported = true; | 333 const bool Debug::kFrameDropperSupported = true; |
344 | 334 |
345 #undef __ | 335 #undef __ |
346 | 336 |
347 } } // namespace v8::internal | 337 } } // namespace v8::internal |
348 | 338 |
349 #endif // V8_TARGET_ARCH_IA32 | 339 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |