Ben Murdoch | 8b112d2 | 2011-06-08 16:22:53 +0100 | [diff] [blame] | 1 | // Copyright 2011 the V8 project authors. All rights reserved. |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 2 | // Redistribution and use in source and binary forms, with or without |
| 3 | // modification, are permitted provided that the following conditions are |
| 4 | // met: |
| 5 | // |
| 6 | // * Redistributions of source code must retain the above copyright |
| 7 | // notice, this list of conditions and the following disclaimer. |
| 8 | // * Redistributions in binary form must reproduce the above |
| 9 | // copyright notice, this list of conditions and the following |
| 10 | // disclaimer in the documentation and/or other materials provided |
| 11 | // with the distribution. |
| 12 | // * Neither the name of Google Inc. nor the names of its |
| 13 | // contributors may be used to endorse or promote products derived |
| 14 | // from this software without specific prior written permission. |
| 15 | // |
| 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 17 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 18 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 19 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 20 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 21 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | |
| 28 | #include "v8.h" |
| 29 | |
Leon Clarke | f7060e2 | 2010-06-03 12:02:55 +0100 | [diff] [blame] | 30 | #if defined(V8_TARGET_ARCH_ARM) |
| 31 | |
Ben Murdoch | 8b112d2 | 2011-06-08 16:22:53 +0100 | [diff] [blame] | 32 | #include "codegen.h" |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 33 | #include "debug.h" |
| 34 | |
| 35 | namespace v8 { |
| 36 | namespace internal { |
| 37 | |
| 38 | #ifdef ENABLE_DEBUGGER_SUPPORT |
| 39 | bool BreakLocationIterator::IsDebugBreakAtReturn() { |
| 40 | return Debug::IsDebugBreakAtReturn(rinfo()); |
| 41 | } |
| 42 | |
| 43 | |
| 44 | void BreakLocationIterator::SetDebugBreakAtReturn() { |
| 45 | // Patch the code changing the return from JS function sequence from |
| 46 | // mov sp, fp |
| 47 | // ldmia sp!, {fp, lr} |
| 48 | // add sp, sp, #4 |
| 49 | // bx lr |
| 50 | // to a call to the debug break return code. |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 51 | // #if USE_BLX |
| 52 | // ldr ip, [pc, #0] |
| 53 | // blx ip |
| 54 | // #else |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 55 | // mov lr, pc |
| 56 | // ldr pc, [pc, #-4] |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 57 | // #endif |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 58 | // <debug break return code entry point address> |
| 59 | // bktp 0 |
Ben Murdoch | 7f4d5bd | 2010-06-15 11:15:29 +0100 | [diff] [blame] | 60 | CodePatcher patcher(rinfo()->pc(), Assembler::kJSReturnSequenceInstructions); |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 61 | #ifdef USE_BLX |
| 62 | patcher.masm()->ldr(v8::internal::ip, MemOperand(v8::internal::pc, 0)); |
| 63 | patcher.masm()->blx(v8::internal::ip); |
| 64 | #else |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 65 | patcher.masm()->mov(v8::internal::lr, v8::internal::pc); |
| 66 | patcher.masm()->ldr(v8::internal::pc, MemOperand(v8::internal::pc, -4)); |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 67 | #endif |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 68 | patcher.Emit(Isolate::Current()->debug()->debug_break_return()->entry()); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 69 | patcher.masm()->bkpt(0); |
| 70 | } |
| 71 | |
| 72 | |
| 73 | // Restore the JS frame exit code. |
| 74 | void BreakLocationIterator::ClearDebugBreakAtReturn() { |
| 75 | rinfo()->PatchCode(original_rinfo()->pc(), |
Ben Murdoch | 7f4d5bd | 2010-06-15 11:15:29 +0100 | [diff] [blame] | 76 | Assembler::kJSReturnSequenceInstructions); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | |
Ben Murdoch | 7f4d5bd | 2010-06-15 11:15:29 +0100 | [diff] [blame] | 80 | // A debug break in the frame exit code is identified by the JS frame exit code |
| 81 | // having been patched with a call instruction. |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 82 | bool Debug::IsDebugBreakAtReturn(RelocInfo* rinfo) { |
| 83 | ASSERT(RelocInfo::IsJSReturn(rinfo->rmode())); |
Steve Block | 3ce2e20 | 2009-11-05 08:53:23 +0000 | [diff] [blame] | 84 | return rinfo->IsPatchedReturnSequence(); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 85 | } |
| 86 | |
| 87 | |
Ben Murdoch | 7f4d5bd | 2010-06-15 11:15:29 +0100 | [diff] [blame] | 88 | bool BreakLocationIterator::IsDebugBreakAtSlot() { |
| 89 | ASSERT(IsDebugBreakSlot()); |
| 90 | // Check whether the debug break slot instructions have been patched. |
| 91 | return rinfo()->IsPatchedDebugBreakSlotSequence(); |
| 92 | } |
| 93 | |
| 94 | |
| 95 | void BreakLocationIterator::SetDebugBreakAtSlot() { |
| 96 | ASSERT(IsDebugBreakSlot()); |
| 97 | // Patch the code changing the debug break slot code from |
| 98 | // mov r2, r2 |
| 99 | // mov r2, r2 |
| 100 | // mov r2, r2 |
| 101 | // to a call to the debug break slot code. |
| 102 | // #if USE_BLX |
| 103 | // ldr ip, [pc, #0] |
| 104 | // blx ip |
| 105 | // #else |
| 106 | // mov lr, pc |
| 107 | // ldr pc, [pc, #-4] |
| 108 | // #endif |
| 109 | // <debug break slot code entry point address> |
| 110 | CodePatcher patcher(rinfo()->pc(), Assembler::kDebugBreakSlotInstructions); |
| 111 | #ifdef USE_BLX |
| 112 | patcher.masm()->ldr(v8::internal::ip, MemOperand(v8::internal::pc, 0)); |
| 113 | patcher.masm()->blx(v8::internal::ip); |
| 114 | #else |
| 115 | patcher.masm()->mov(v8::internal::lr, v8::internal::pc); |
| 116 | patcher.masm()->ldr(v8::internal::pc, MemOperand(v8::internal::pc, -4)); |
| 117 | #endif |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 118 | patcher.Emit(Isolate::Current()->debug()->debug_break_slot()->entry()); |
Ben Murdoch | 7f4d5bd | 2010-06-15 11:15:29 +0100 | [diff] [blame] | 119 | } |
| 120 | |
| 121 | |
| 122 | void BreakLocationIterator::ClearDebugBreakAtSlot() { |
| 123 | ASSERT(IsDebugBreakSlot()); |
| 124 | rinfo()->PatchCode(original_rinfo()->pc(), |
| 125 | Assembler::kDebugBreakSlotInstructions); |
| 126 | } |
| 127 | |
| 128 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 129 | #define __ ACCESS_MASM(masm) |
| 130 | |
| 131 | |
| 132 | static void Generate_DebugBreakCallHelper(MacroAssembler* masm, |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 133 | RegList object_regs, |
| 134 | RegList non_object_regs) { |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 135 | { |
| 136 | FrameScope scope(masm, StackFrame::INTERNAL); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 137 | |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 138 | // Store the registers containing live values on the expression stack to |
| 139 | // make sure that these are correctly updated during GC. Non object values |
| 140 | // are stored as a smi causing it to be untouched by GC. |
| 141 | ASSERT((object_regs & ~kJSCallerSaved) == 0); |
| 142 | ASSERT((non_object_regs & ~kJSCallerSaved) == 0); |
| 143 | ASSERT((object_regs & non_object_regs) == 0); |
| 144 | if ((object_regs | non_object_regs) != 0) { |
| 145 | for (int i = 0; i < kNumJSCallerSaved; i++) { |
| 146 | int r = JSCallerSavedCode(i); |
| 147 | Register reg = { r }; |
| 148 | if ((non_object_regs & (1 << r)) != 0) { |
| 149 | if (FLAG_debug_code) { |
| 150 | __ tst(reg, Operand(0xc0000000)); |
| 151 | __ Assert(eq, "Unable to encode value as smi"); |
| 152 | } |
| 153 | __ mov(reg, Operand(reg, LSL, kSmiTagSize)); |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 154 | } |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 155 | } |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 156 | __ stm(db_w, sp, object_regs | non_object_regs); |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 157 | } |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 158 | |
| 159 | #ifdef DEBUG |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 160 | __ RecordComment("// Calling from debug break to runtime - come in - over"); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 161 | #endif |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 162 | __ mov(r0, Operand(0, RelocInfo::NONE)); // no arguments |
| 163 | __ mov(r1, Operand(ExternalReference::debug_break(masm->isolate()))); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 164 | |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 165 | CEntryStub ceb(1); |
| 166 | __ CallStub(&ceb); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 167 | |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 168 | // Restore the register values from the expression stack. |
| 169 | if ((object_regs | non_object_regs) != 0) { |
| 170 | __ ldm(ia_w, sp, object_regs | non_object_regs); |
| 171 | for (int i = 0; i < kNumJSCallerSaved; i++) { |
| 172 | int r = JSCallerSavedCode(i); |
| 173 | Register reg = { r }; |
| 174 | if ((non_object_regs & (1 << r)) != 0) { |
| 175 | __ mov(reg, Operand(reg, LSR, kSmiTagSize)); |
| 176 | } |
| 177 | if (FLAG_debug_code && |
| 178 | (((object_regs |non_object_regs) & (1 << r)) == 0)) { |
| 179 | __ mov(reg, Operand(kDebugZapValue)); |
| 180 | } |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 181 | } |
| 182 | } |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 183 | |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 184 | // Leave the internal frame. |
| 185 | } |
Ben Murdoch | 85b7179 | 2012-04-11 18:30:58 +0100 | [diff] [blame] | 186 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 187 | // Now that the break point has been handled, resume normal execution by |
| 188 | // jumping to the target address intended by the caller and that was |
| 189 | // overwritten by the address of DebugBreakXXX. |
Steve Block | 44f0eee | 2011-05-26 01:26:41 +0100 | [diff] [blame] | 190 | ExternalReference after_break_target = |
| 191 | ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate()); |
| 192 | __ mov(ip, Operand(after_break_target)); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 193 | __ ldr(ip, MemOperand(ip)); |
| 194 | __ Jump(ip); |
| 195 | } |
| 196 | |
| 197 | |
| 198 | void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) { |
| 199 | // Calling convention for IC load (from ic-arm.cc). |
| 200 | // ----------- S t a t e ------------- |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 201 | // -- r2 : name |
| 202 | // -- lr : return address |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 203 | // -- r0 : receiver |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 204 | // -- [sp] : receiver |
| 205 | // ----------------------------------- |
Andrei Popescu | 402d937 | 2010-02-26 13:31:12 +0000 | [diff] [blame] | 206 | // Registers r0 and r2 contain objects that need to be pushed on the |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 207 | // expression stack of the fake JS frame. |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 208 | Generate_DebugBreakCallHelper(masm, r0.bit() | r2.bit(), 0); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 209 | } |
| 210 | |
| 211 | |
| 212 | void Debug::GenerateStoreICDebugBreak(MacroAssembler* masm) { |
| 213 | // Calling convention for IC store (from ic-arm.cc). |
| 214 | // ----------- S t a t e ------------- |
Andrei Popescu | 402d937 | 2010-02-26 13:31:12 +0000 | [diff] [blame] | 215 | // -- r0 : value |
| 216 | // -- r1 : receiver |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 217 | // -- r2 : name |
| 218 | // -- lr : return address |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 219 | // ----------------------------------- |
Andrei Popescu | 402d937 | 2010-02-26 13:31:12 +0000 | [diff] [blame] | 220 | // Registers r0, r1, and r2 contain objects that need to be pushed on the |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 221 | // expression stack of the fake JS frame. |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 222 | Generate_DebugBreakCallHelper(masm, r0.bit() | r1.bit() | r2.bit(), 0); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | |
| 226 | void Debug::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) { |
| 227 | // ---------- S t a t e -------------- |
| 228 | // -- lr : return address |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 229 | // -- r0 : key |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 230 | // -- r1 : receiver |
| 231 | Generate_DebugBreakCallHelper(masm, r0.bit() | r1.bit(), 0); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 232 | } |
| 233 | |
| 234 | |
| 235 | void Debug::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) { |
| 236 | // ---------- S t a t e -------------- |
Leon Clarke | f7060e2 | 2010-06-03 12:02:55 +0100 | [diff] [blame] | 237 | // -- r0 : value |
| 238 | // -- r1 : key |
| 239 | // -- r2 : receiver |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 240 | // -- lr : return address |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 241 | Generate_DebugBreakCallHelper(masm, r0.bit() | r1.bit() | r2.bit(), 0); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 242 | } |
| 243 | |
| 244 | |
| 245 | void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) { |
| 246 | // Calling convention for IC call (from ic-arm.cc) |
| 247 | // ----------- S t a t e ------------- |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 248 | // -- r2 : name |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 249 | // ----------------------------------- |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 250 | Generate_DebugBreakCallHelper(masm, r2.bit(), 0); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 251 | } |
| 252 | |
| 253 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 254 | void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { |
| 255 | // In places other than IC call sites it is expected that r0 is TOS which |
| 256 | // is an object - this is not generally the case so this should be used with |
| 257 | // care. |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 258 | Generate_DebugBreakCallHelper(masm, r0.bit(), 0); |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 259 | } |
| 260 | |
| 261 | |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 262 | void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { |
| 263 | // Register state for CallFunctionStub (from code-stubs-arm.cc). |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 264 | // ----------- S t a t e ------------- |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 265 | // -- r1 : function |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 266 | // ----------------------------------- |
Ben Murdoch | 3ef787d | 2012-04-12 10:51:47 +0100 | [diff] [blame] | 267 | Generate_DebugBreakCallHelper(masm, r1.bit(), 0); |
| 268 | } |
| 269 | |
| 270 | |
| 271 | void Debug::GenerateCallFunctionStubRecordDebugBreak(MacroAssembler* masm) { |
| 272 | // Register state for CallFunctionStub (from code-stubs-arm.cc). |
| 273 | // ----------- S t a t e ------------- |
| 274 | // -- r1 : function |
| 275 | // -- r2 : cache cell for call target |
| 276 | // ----------------------------------- |
| 277 | Generate_DebugBreakCallHelper(masm, r1.bit() | r2.bit(), 0); |
| 278 | } |
| 279 | |
| 280 | |
| 281 | void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { |
| 282 | // Calling convention for CallConstructStub (from code-stubs-arm.cc) |
| 283 | // ----------- S t a t e ------------- |
| 284 | // -- r0 : number of arguments (not smi) |
| 285 | // -- r1 : constructor function |
| 286 | // ----------------------------------- |
| 287 | Generate_DebugBreakCallHelper(masm, r1.bit(), r0.bit()); |
| 288 | } |
| 289 | |
| 290 | |
| 291 | void Debug::GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm) { |
| 292 | // Calling convention for CallConstructStub (from code-stubs-arm.cc) |
| 293 | // ----------- S t a t e ------------- |
| 294 | // -- r0 : number of arguments (not smi) |
| 295 | // -- r1 : constructor function |
| 296 | // -- r2 : cache cell for call target |
| 297 | // ----------------------------------- |
| 298 | Generate_DebugBreakCallHelper(masm, r1.bit() | r2.bit(), r0.bit()); |
Ben Murdoch | 5d4cdbf | 2012-04-11 10:23:59 +0100 | [diff] [blame] | 299 | } |
| 300 | |
| 301 | |
Ben Murdoch | 7f4d5bd | 2010-06-15 11:15:29 +0100 | [diff] [blame] | 302 | void Debug::GenerateSlot(MacroAssembler* masm) { |
| 303 | // Generate enough nop's to make space for a call instruction. Avoid emitting |
| 304 | // the constant pool in the debug break slot code. |
| 305 | Assembler::BlockConstPoolScope block_const_pool(masm); |
| 306 | Label check_codesize; |
| 307 | __ bind(&check_codesize); |
| 308 | __ RecordDebugBreakSlot(); |
| 309 | for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { |
Shimeng (Simon) Wang | 8a31eba | 2010-12-06 19:01:33 -0800 | [diff] [blame] | 310 | __ nop(MacroAssembler::DEBUG_BREAK_NOP); |
Ben Murdoch | 7f4d5bd | 2010-06-15 11:15:29 +0100 | [diff] [blame] | 311 | } |
| 312 | ASSERT_EQ(Assembler::kDebugBreakSlotInstructions, |
| 313 | masm->InstructionsGeneratedSince(&check_codesize)); |
| 314 | } |
| 315 | |
| 316 | |
| 317 | void Debug::GenerateSlotDebugBreak(MacroAssembler* masm) { |
| 318 | // In the places where a debug break slot is inserted no registers can contain |
| 319 | // object pointers. |
Kristian Monsen | 80d68ea | 2010-09-08 11:05:35 +0100 | [diff] [blame] | 320 | Generate_DebugBreakCallHelper(masm, 0, 0); |
Ben Murdoch | 7f4d5bd | 2010-06-15 11:15:29 +0100 | [diff] [blame] | 321 | } |
| 322 | |
| 323 | |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 324 | void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) { |
| 325 | masm->Abort("LiveEdit frame dropping is not supported on arm"); |
| 326 | } |
| 327 | |
Ben Murdoch | 7f4d5bd | 2010-06-15 11:15:29 +0100 | [diff] [blame] | 328 | |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 329 | void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
| 330 | masm->Abort("LiveEdit frame dropping is not supported on arm"); |
| 331 | } |
| 332 | |
Iain Merrick | 7568138 | 2010-08-19 15:07:18 +0100 | [diff] [blame] | 333 | const bool Debug::kFrameDropperSupported = false; |
| 334 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 335 | #undef __ |
| 336 | |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 337 | |
Steve Block | 6ded16b | 2010-05-10 14:33:55 +0100 | [diff] [blame] | 338 | |
Steve Block | a7e24c1 | 2009-10-30 11:49:00 +0000 | [diff] [blame] | 339 | #endif // ENABLE_DEBUGGER_SUPPORT |
| 340 | |
| 341 | } } // namespace v8::internal |
Leon Clarke | f7060e2 | 2010-06-03 12:02:55 +0100 | [diff] [blame] | 342 | |
| 343 | #endif // V8_TARGET_ARCH_ARM |