OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // jumping to the target address intended by the caller and that was | 93 // jumping to the target address intended by the caller and that was |
94 // overwritten by the address of DebugBreakXXX. | 94 // overwritten by the address of DebugBreakXXX. |
95 ExternalReference after_break_target = | 95 ExternalReference after_break_target = |
96 ExternalReference(Debug_Address::AfterBreakTarget()); | 96 ExternalReference(Debug_Address::AfterBreakTarget()); |
97 __ movq(kScratchRegister, after_break_target); | 97 __ movq(kScratchRegister, after_break_target); |
98 __ jmp(Operand(kScratchRegister, 0)); | 98 __ jmp(Operand(kScratchRegister, 0)); |
99 } | 99 } |
100 | 100 |
101 | 101 |
102 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) { | 102 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) { |
103 // Register state for keyed IC call call (from ic-x64.cc) | 103 // Register state for IC call call (from ic-x64.cc) |
104 // ----------- S t a t e ------------- | 104 // ----------- S t a t e ------------- |
105 // -- rax: number of arguments | 105 // -- rcx: function name |
106 // ----------------------------------- | 106 // ----------------------------------- |
107 // The number of arguments in rax is not smi encoded. | 107 Generate_DebugBreakCallHelper(masm, rcx.bit(), false); |
108 Generate_DebugBreakCallHelper(masm, 0, false); | |
109 } | 108 } |
110 | 109 |
111 | 110 |
112 void Debug::GenerateConstructCallDebugBreak(MacroAssembler* masm) { | 111 void Debug::GenerateConstructCallDebugBreak(MacroAssembler* masm) { |
113 // Register state just before return from JS function (from codegen-x64.cc). | 112 // Register state just before return from JS function (from codegen-x64.cc). |
114 // rax is the actual number of arguments not encoded as a smi, see comment | 113 // rax is the actual number of arguments not encoded as a smi, see comment |
115 // above IC call. | 114 // above IC call. |
116 // ----------- S t a t e ------------- | 115 // ----------- S t a t e ------------- |
117 // -- rax: number of arguments | 116 // -- rax: number of arguments |
118 // ----------------------------------- | 117 // ----------------------------------- |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 ASSERT(IsDebugBreakSlot()); | 274 ASSERT(IsDebugBreakSlot()); |
276 rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength); | 275 rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength); |
277 } | 276 } |
278 | 277 |
279 | 278 |
280 #endif // ENABLE_DEBUGGER_SUPPORT | 279 #endif // ENABLE_DEBUGGER_SUPPORT |
281 | 280 |
282 } } // namespace v8::internal | 281 } } // namespace v8::internal |
283 | 282 |
284 #endif // V8_TARGET_ARCH_X64 | 283 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |