Index: src/arm/debug-arm.cc |
=================================================================== |
--- src/arm/debug-arm.cc (revision 8124) |
+++ src/arm/debug-arm.cc (working copy) |
@@ -132,58 +132,56 @@ |
static void Generate_DebugBreakCallHelper(MacroAssembler* masm, |
RegList object_regs, |
RegList non_object_regs) { |
- { |
- FrameScope scope(masm, StackFrame::INTERNAL); |
+ __ EnterInternalFrame(); |
- // Store the registers containing live values on the expression stack to |
- // make sure that these are correctly updated during GC. Non object values |
- // are stored as a smi causing it to be untouched by GC. |
- ASSERT((object_regs & ~kJSCallerSaved) == 0); |
- ASSERT((non_object_regs & ~kJSCallerSaved) == 0); |
- ASSERT((object_regs & non_object_regs) == 0); |
- if ((object_regs | non_object_regs) != 0) { |
- for (int i = 0; i < kNumJSCallerSaved; i++) { |
- int r = JSCallerSavedCode(i); |
- Register reg = { r }; |
- if ((non_object_regs & (1 << r)) != 0) { |
- if (FLAG_debug_code) { |
- __ tst(reg, Operand(0xc0000000)); |
- __ Assert(eq, "Unable to encode value as smi"); |
- } |
- __ mov(reg, Operand(reg, LSL, kSmiTagSize)); |
+ // Store the registers containing live values on the expression stack to |
+ // make sure that these are correctly updated during GC. Non object values |
+ // are stored as a smi causing it to be untouched by GC. |
+ ASSERT((object_regs & ~kJSCallerSaved) == 0); |
+ ASSERT((non_object_regs & ~kJSCallerSaved) == 0); |
+ ASSERT((object_regs & non_object_regs) == 0); |
+ if ((object_regs | non_object_regs) != 0) { |
+ for (int i = 0; i < kNumJSCallerSaved; i++) { |
+ int r = JSCallerSavedCode(i); |
+ Register reg = { r }; |
+ if ((non_object_regs & (1 << r)) != 0) { |
+ if (FLAG_debug_code) { |
+ __ tst(reg, Operand(0xc0000000)); |
+ __ Assert(eq, "Unable to encode value as smi"); |
} |
+ __ mov(reg, Operand(reg, LSL, kSmiTagSize)); |
} |
- __ stm(db_w, sp, object_regs | non_object_regs); |
} |
+ __ stm(db_w, sp, object_regs | non_object_regs); |
+ } |
#ifdef DEBUG |
- __ RecordComment("// Calling from debug break to runtime - come in - over"); |
+ __ RecordComment("// Calling from debug break to runtime - come in - over"); |
#endif |
- __ mov(r0, Operand(0, RelocInfo::NONE)); // no arguments |
- __ mov(r1, Operand(ExternalReference::debug_break(masm->isolate()))); |
+ __ mov(r0, Operand(0, RelocInfo::NONE)); // no arguments |
+ __ mov(r1, Operand(ExternalReference::debug_break(masm->isolate()))); |
- CEntryStub ceb(1); |
- __ CallStub(&ceb); |
+ CEntryStub ceb(1); |
+ __ CallStub(&ceb); |
- // Restore the register values from the expression stack. |
- if ((object_regs | non_object_regs) != 0) { |
- __ ldm(ia_w, sp, object_regs | non_object_regs); |
- for (int i = 0; i < kNumJSCallerSaved; i++) { |
- int r = JSCallerSavedCode(i); |
- Register reg = { r }; |
- if ((non_object_regs & (1 << r)) != 0) { |
- __ mov(reg, Operand(reg, LSR, kSmiTagSize)); |
- } |
- if (FLAG_debug_code && |
- (((object_regs |non_object_regs) & (1 << r)) == 0)) { |
- __ mov(reg, Operand(kDebugZapValue)); |
- } |
+ // Restore the register values from the expression stack. |
+ if ((object_regs | non_object_regs) != 0) { |
+ __ ldm(ia_w, sp, object_regs | non_object_regs); |
+ for (int i = 0; i < kNumJSCallerSaved; i++) { |
+ int r = JSCallerSavedCode(i); |
+ Register reg = { r }; |
+ if ((non_object_regs & (1 << r)) != 0) { |
+ __ mov(reg, Operand(reg, LSR, kSmiTagSize)); |
} |
+ if (FLAG_debug_code && |
+ (((object_regs |non_object_regs) & (1 << r)) == 0)) { |
+ __ mov(reg, Operand(kDebugZapValue)); |
+ } |
} |
- |
- // Leave the internal frame. |
} |
+ __ LeaveInternalFrame(); |
+ |
// Now that the break point has been handled, resume normal execution by |
// jumping to the target address intended by the caller and that was |
// overwritten by the address of DebugBreakXXX. |