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 // -- rbx : type feedback vector | |
184 // -- rdx : type feedback slot (smi) | |
185 // -- rdi : function | |
186 // ----------------------------------- | |
187 Generate_DebugBreakCallHelper(masm, rbx.bit() | rdx.bit() | rdi.bit(), | |
188 0, false); | |
189 } | |
190 | |
191 | |
192 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) { | 180 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) { |
193 // Register state for IC load call (from ic-x64.cc). | 181 // Register state for IC load call (from ic-x64.cc). |
194 // ----------- S t a t e ------------- | 182 // ----------- S t a t e ------------- |
195 // -- rax : receiver | 183 // -- rax : receiver |
196 // -- rcx : name | 184 // -- rcx : name |
197 // ----------------------------------- | 185 // ----------------------------------- |
198 Generate_DebugBreakCallHelper(masm, rax.bit() | rcx.bit(), 0, false); | 186 Generate_DebugBreakCallHelper(masm, rax.bit() | rcx.bit(), 0, false); |
199 } | 187 } |
200 | 188 |
201 | 189 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 223 |
236 void Debug::GenerateCompareNilICDebugBreak(MacroAssembler* masm) { | 224 void Debug::GenerateCompareNilICDebugBreak(MacroAssembler* masm) { |
237 // Register state for CompareNil IC | 225 // Register state for CompareNil IC |
238 // ----------- S t a t e ------------- | 226 // ----------- S t a t e ------------- |
239 // -- rax : value | 227 // -- rax : value |
240 // ----------------------------------- | 228 // ----------------------------------- |
241 Generate_DebugBreakCallHelper(masm, rax.bit(), 0, false); | 229 Generate_DebugBreakCallHelper(masm, rax.bit(), 0, false); |
242 } | 230 } |
243 | 231 |
244 | 232 |
| 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 |
245 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { | 242 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { |
246 // Register state just before return from JS function (from codegen-x64.cc). | 243 // Register state just before return from JS function (from codegen-x64.cc). |
247 // ----------- S t a t e ------------- | 244 // ----------- S t a t e ------------- |
248 // -- rax: return value | 245 // -- rax: return value |
249 // ----------------------------------- | 246 // ----------------------------------- |
250 Generate_DebugBreakCallHelper(masm, rax.bit(), 0, true); | 247 Generate_DebugBreakCallHelper(masm, rax.bit(), 0, true); |
251 } | 248 } |
252 | 249 |
253 | 250 |
254 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { | 251 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { |
255 // Register state for CallFunctionStub (from code-stubs-x64.cc). | 252 // Register state for CallFunctionStub (from code-stubs-x64.cc). |
256 // ----------- S t a t e ------------- | 253 // ----------- S t a t e ------------- |
257 // -- rdi : function | 254 // -- rdi : function |
258 // ----------------------------------- | 255 // ----------------------------------- |
259 Generate_DebugBreakCallHelper(masm, rdi.bit(), 0, false); | 256 Generate_DebugBreakCallHelper(masm, rdi.bit(), 0, false); |
260 } | 257 } |
261 | 258 |
262 | 259 |
| 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 |
263 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { | 272 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { |
264 // Register state for CallConstructStub (from code-stubs-x64.cc). | 273 // Register state for CallConstructStub (from code-stubs-x64.cc). |
265 // rax is the actual number of arguments not encoded as a smi, see comment | 274 // rax is the actual number of arguments not encoded as a smi, see comment |
266 // above IC call. | 275 // above IC call. |
267 // ----------- S t a t e ------------- | 276 // ----------- S t a t e ------------- |
268 // -- rax: number of arguments | 277 // -- rax: number of arguments |
269 // ----------------------------------- | 278 // ----------------------------------- |
270 // The number of arguments in rax is not smi encoded. | 279 // The number of arguments in rax is not smi encoded. |
271 Generate_DebugBreakCallHelper(masm, rdi.bit(), rax.bit(), false); | 280 Generate_DebugBreakCallHelper(masm, rdi.bit(), rax.bit(), false); |
272 } | 281 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 | 346 |
338 const bool Debug::kFrameDropperSupported = true; | 347 const bool Debug::kFrameDropperSupported = true; |
339 | 348 |
340 #undef __ | 349 #undef __ |
341 | 350 |
342 #endif // ENABLE_DEBUGGER_SUPPORT | 351 #endif // ENABLE_DEBUGGER_SUPPORT |
343 | 352 |
344 } } // namespace v8::internal | 353 } } // namespace v8::internal |
345 | 354 |
346 #endif // V8_TARGET_ARCH_X64 | 355 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |