OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 __ mov(reg, Operand(reg, LSL, kSmiTagSize)); | 152 __ mov(reg, Operand(reg, LSL, kSmiTagSize)); |
153 } | 153 } |
154 } | 154 } |
155 __ stm(db_w, sp, object_regs | non_object_regs); | 155 __ stm(db_w, sp, object_regs | non_object_regs); |
156 } | 156 } |
157 | 157 |
158 #ifdef DEBUG | 158 #ifdef DEBUG |
159 __ RecordComment("// Calling from debug break to runtime - come in - over"); | 159 __ RecordComment("// Calling from debug break to runtime - come in - over"); |
160 #endif | 160 #endif |
161 __ mov(r0, Operand(0, RelocInfo::NONE)); // no arguments | 161 __ mov(r0, Operand(0, RelocInfo::NONE)); // no arguments |
162 __ mov(r1, Operand(ExternalReference::debug_break())); | 162 __ mov(r1, Operand(ExternalReference::debug_break(masm->isolate()))); |
163 | 163 |
164 CEntryStub ceb(1); | 164 CEntryStub ceb(1); |
165 __ CallStub(&ceb); | 165 __ CallStub(&ceb); |
166 | 166 |
167 // Restore the register values from the expression stack. | 167 // Restore the register values from the expression stack. |
168 if ((object_regs | non_object_regs) != 0) { | 168 if ((object_regs | non_object_regs) != 0) { |
169 __ ldm(ia_w, sp, object_regs | non_object_regs); | 169 __ ldm(ia_w, sp, object_regs | non_object_regs); |
170 for (int i = 0; i < kNumJSCallerSaved; i++) { | 170 for (int i = 0; i < kNumJSCallerSaved; i++) { |
171 int r = JSCallerSavedCode(i); | 171 int r = JSCallerSavedCode(i); |
172 Register reg = { r }; | 172 Register reg = { r }; |
173 if ((non_object_regs & (1 << r)) != 0) { | 173 if ((non_object_regs & (1 << r)) != 0) { |
174 __ mov(reg, Operand(reg, LSR, kSmiTagSize)); | 174 __ mov(reg, Operand(reg, LSR, kSmiTagSize)); |
175 } | 175 } |
176 if (FLAG_debug_code && | 176 if (FLAG_debug_code && |
177 (((object_regs |non_object_regs) & (1 << r)) == 0)) { | 177 (((object_regs |non_object_regs) & (1 << r)) == 0)) { |
178 __ mov(reg, Operand(kDebugZapValue)); | 178 __ mov(reg, Operand(kDebugZapValue)); |
179 } | 179 } |
180 } | 180 } |
181 } | 181 } |
182 | 182 |
183 __ LeaveInternalFrame(); | 183 __ LeaveInternalFrame(); |
184 | 184 |
185 // Now that the break point has been handled, resume normal execution by | 185 // Now that the break point has been handled, resume normal execution by |
186 // jumping to the target address intended by the caller and that was | 186 // jumping to the target address intended by the caller and that was |
187 // overwritten by the address of DebugBreakXXX. | 187 // overwritten by the address of DebugBreakXXX. |
188 __ mov(ip, Operand(ExternalReference(Debug_Address::AfterBreakTarget()))); | 188 ExternalReference after_break_target = |
| 189 ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate()); |
| 190 __ mov(ip, Operand(after_break_target)); |
189 __ ldr(ip, MemOperand(ip)); | 191 __ ldr(ip, MemOperand(ip)); |
190 __ Jump(ip); | 192 __ Jump(ip); |
191 } | 193 } |
192 | 194 |
193 | 195 |
194 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) { | 196 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) { |
195 // Calling convention for IC load (from ic-arm.cc). | 197 // Calling convention for IC load (from ic-arm.cc). |
196 // ----------- S t a t e ------------- | 198 // ----------- S t a t e ------------- |
197 // -- r2 : name | 199 // -- r2 : name |
198 // -- lr : return address | 200 // -- lr : return address |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 308 |
307 #undef __ | 309 #undef __ |
308 | 310 |
309 | 311 |
310 | 312 |
311 #endif // ENABLE_DEBUGGER_SUPPORT | 313 #endif // ENABLE_DEBUGGER_SUPPORT |
312 | 314 |
313 } } // namespace v8::internal | 315 } } // namespace v8::internal |
314 | 316 |
315 #endif // V8_TARGET_ARCH_ARM | 317 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |