OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 // Now that the break point has been handled, resume normal execution by | 170 // Now that the break point has been handled, resume normal execution by |
171 // jumping to the target address intended by the caller and that was | 171 // jumping to the target address intended by the caller and that was |
172 // overwritten by the address of DebugBreakXXX. | 172 // overwritten by the address of DebugBreakXXX. |
173 ExternalReference after_break_target = | 173 ExternalReference after_break_target = |
174 ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate()); | 174 ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate()); |
175 __ Move(kScratchRegister, after_break_target); | 175 __ Move(kScratchRegister, after_break_target); |
176 __ Jump(Operand(kScratchRegister, 0)); | 176 __ Jump(Operand(kScratchRegister, 0)); |
177 } | 177 } |
178 | 178 |
179 | 179 |
| 180 void Debug::GenerateCallICStubDebugBreak(MacroAssembler* masm) { |
| 181 // Register state for CallICStub |
| 182 // ----------- S t a t e ------------- |
| 183 // -- rdx : type feedback slot (smi) |
| 184 // -- rdi : function |
| 185 // ----------------------------------- |
| 186 Generate_DebugBreakCallHelper(masm, rdx.bit() | rdi.bit(), 0, false); |
| 187 } |
| 188 |
| 189 |
180 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) { | 190 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) { |
181 // Register state for IC load call (from ic-x64.cc). | 191 // Register state for IC load call (from ic-x64.cc). |
182 // ----------- S t a t e ------------- | 192 // ----------- S t a t e ------------- |
183 // -- rax : receiver | 193 // -- rax : receiver |
184 // -- rcx : name | 194 // -- rcx : name |
185 // ----------------------------------- | 195 // ----------------------------------- |
186 Generate_DebugBreakCallHelper(masm, rax.bit() | rcx.bit(), 0, false); | 196 Generate_DebugBreakCallHelper(masm, rax.bit() | rcx.bit(), 0, false); |
187 } | 197 } |
188 | 198 |
189 | 199 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 233 |
224 void Debug::GenerateCompareNilICDebugBreak(MacroAssembler* masm) { | 234 void Debug::GenerateCompareNilICDebugBreak(MacroAssembler* masm) { |
225 // Register state for CompareNil IC | 235 // Register state for CompareNil IC |
226 // ----------- S t a t e ------------- | 236 // ----------- S t a t e ------------- |
227 // -- rax : value | 237 // -- rax : value |
228 // ----------------------------------- | 238 // ----------------------------------- |
229 Generate_DebugBreakCallHelper(masm, rax.bit(), 0, false); | 239 Generate_DebugBreakCallHelper(masm, rax.bit(), 0, false); |
230 } | 240 } |
231 | 241 |
232 | 242 |
233 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) { | |
234 // Register state for IC call call (from ic-x64.cc) | |
235 // ----------- S t a t e ------------- | |
236 // -- rcx: function name | |
237 // ----------------------------------- | |
238 Generate_DebugBreakCallHelper(masm, rcx.bit(), 0, false); | |
239 } | |
240 | |
241 | |
242 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { | 243 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { |
243 // Register state just before return from JS function (from codegen-x64.cc). | 244 // Register state just before return from JS function (from codegen-x64.cc). |
244 // ----------- S t a t e ------------- | 245 // ----------- S t a t e ------------- |
245 // -- rax: return value | 246 // -- rax: return value |
246 // ----------------------------------- | 247 // ----------------------------------- |
247 Generate_DebugBreakCallHelper(masm, rax.bit(), 0, true); | 248 Generate_DebugBreakCallHelper(masm, rax.bit(), 0, true); |
248 } | 249 } |
249 | 250 |
250 | 251 |
251 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { | 252 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { |
252 // Register state for CallFunctionStub (from code-stubs-x64.cc). | 253 // Register state for CallFunctionStub (from code-stubs-x64.cc). |
253 // ----------- S t a t e ------------- | 254 // ----------- S t a t e ------------- |
254 // -- rdi : function | 255 // -- rdi : function |
255 // ----------------------------------- | 256 // ----------------------------------- |
256 Generate_DebugBreakCallHelper(masm, rdi.bit(), 0, false); | 257 Generate_DebugBreakCallHelper(masm, rdi.bit(), 0, false); |
257 } | 258 } |
258 | 259 |
259 | 260 |
260 void Debug::GenerateCallFunctionStubRecordDebugBreak(MacroAssembler* masm) { | |
261 // Register state for CallFunctionStub (from code-stubs-x64.cc). | |
262 // ----------- S t a t e ------------- | |
263 // -- rdi : function | |
264 // -- rbx: feedback array | |
265 // -- rdx: slot in feedback array | |
266 // ----------------------------------- | |
267 Generate_DebugBreakCallHelper(masm, rbx.bit() | rdx.bit() | rdi.bit(), | |
268 0, false); | |
269 } | |
270 | |
271 | |
272 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { | 261 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { |
273 // Register state for CallConstructStub (from code-stubs-x64.cc). | 262 // Register state for CallConstructStub (from code-stubs-x64.cc). |
274 // rax is the actual number of arguments not encoded as a smi, see comment | 263 // rax is the actual number of arguments not encoded as a smi, see comment |
275 // above IC call. | 264 // above IC call. |
276 // ----------- S t a t e ------------- | 265 // ----------- S t a t e ------------- |
277 // -- rax: number of arguments | 266 // -- rax: number of arguments |
278 // ----------------------------------- | 267 // ----------------------------------- |
279 // The number of arguments in rax is not smi encoded. | 268 // The number of arguments in rax is not smi encoded. |
280 Generate_DebugBreakCallHelper(masm, rdi.bit(), rax.bit(), false); | 269 Generate_DebugBreakCallHelper(masm, rdi.bit(), rax.bit(), false); |
281 } | 270 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 335 |
347 const bool Debug::kFrameDropperSupported = true; | 336 const bool Debug::kFrameDropperSupported = true; |
348 | 337 |
349 #undef __ | 338 #undef __ |
350 | 339 |
351 #endif // ENABLE_DEBUGGER_SUPPORT | 340 #endif // ENABLE_DEBUGGER_SUPPORT |
352 | 341 |
353 } } // namespace v8::internal | 342 } } // namespace v8::internal |
354 | 343 |
355 #endif // V8_TARGET_ARCH_X64 | 344 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |