Index: src/x64/debug-x64.cc |
=================================================================== |
--- src/x64/debug-x64.cc (revision 8124) |
+++ src/x64/debug-x64.cc (working copy) |
@@ -100,66 +100,65 @@ |
RegList non_object_regs, |
bool convert_call_to_jmp) { |
// Enter an internal frame. |
- { |
- 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 as two smis 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); |
- for (int i = 0; i < kNumJSCallerSaved; i++) { |
- int r = JSCallerSavedCode(i); |
- Register reg = { r }; |
- ASSERT(!reg.is(kScratchRegister)); |
- if ((object_regs & (1 << r)) != 0) { |
- __ push(reg); |
- } |
- // Store the 64-bit value as two smis. |
- if ((non_object_regs & (1 << r)) != 0) { |
- __ movq(kScratchRegister, reg); |
- __ Integer32ToSmi(reg, reg); |
- __ push(reg); |
- __ sar(kScratchRegister, Immediate(32)); |
- __ Integer32ToSmi(kScratchRegister, kScratchRegister); |
- __ push(kScratchRegister); |
- } |
+ // 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 as two smis 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); |
+ for (int i = 0; i < kNumJSCallerSaved; i++) { |
+ int r = JSCallerSavedCode(i); |
+ Register reg = { r }; |
+ ASSERT(!reg.is(kScratchRegister)); |
+ if ((object_regs & (1 << r)) != 0) { |
+ __ push(reg); |
} |
+ // Store the 64-bit value as two smis. |
+ if ((non_object_regs & (1 << r)) != 0) { |
+ __ movq(kScratchRegister, reg); |
+ __ Integer32ToSmi(reg, reg); |
+ __ push(reg); |
+ __ sar(kScratchRegister, Immediate(32)); |
+ __ Integer32ToSmi(kScratchRegister, kScratchRegister); |
+ __ push(kScratchRegister); |
+ } |
+ } |
#ifdef DEBUG |
- __ RecordComment("// Calling from debug break to runtime - come in - over"); |
+ __ RecordComment("// Calling from debug break to runtime - come in - over"); |
#endif |
- __ Set(rax, 0); // No arguments (argc == 0). |
- __ movq(rbx, ExternalReference::debug_break(masm->isolate())); |
+ __ Set(rax, 0); // No arguments (argc == 0). |
+ __ movq(rbx, ExternalReference::debug_break(masm->isolate())); |
- CEntryStub ceb(1); |
- __ CallStub(&ceb); |
+ CEntryStub ceb(1); |
+ __ CallStub(&ceb); |
- // Restore the register values from the expression stack. |
- for (int i = kNumJSCallerSaved - 1; i >= 0; i--) { |
- int r = JSCallerSavedCode(i); |
- Register reg = { r }; |
- if (FLAG_debug_code) { |
- __ Set(reg, kDebugZapValue); |
- } |
- if ((object_regs & (1 << r)) != 0) { |
- __ pop(reg); |
- } |
- // Reconstruct the 64-bit value from two smis. |
- if ((non_object_regs & (1 << r)) != 0) { |
- __ pop(kScratchRegister); |
- __ SmiToInteger32(kScratchRegister, kScratchRegister); |
- __ shl(kScratchRegister, Immediate(32)); |
- __ pop(reg); |
- __ SmiToInteger32(reg, reg); |
- __ or_(reg, kScratchRegister); |
- } |
+ // Restore the register values from the expression stack. |
+ for (int i = kNumJSCallerSaved - 1; i >= 0; i--) { |
+ int r = JSCallerSavedCode(i); |
+ Register reg = { r }; |
+ if (FLAG_debug_code) { |
+ __ Set(reg, kDebugZapValue); |
} |
- |
- // Get rid of the internal frame. |
+ if ((object_regs & (1 << r)) != 0) { |
+ __ pop(reg); |
+ } |
+ // Reconstruct the 64-bit value from two smis. |
+ if ((non_object_regs & (1 << r)) != 0) { |
+ __ pop(kScratchRegister); |
+ __ SmiToInteger32(kScratchRegister, kScratchRegister); |
+ __ shl(kScratchRegister, Immediate(32)); |
+ __ pop(reg); |
+ __ SmiToInteger32(reg, reg); |
+ __ or_(reg, kScratchRegister); |
+ } |
} |
+ // Get rid of the internal frame. |
+ __ LeaveInternalFrame(); |
+ |
// If this call did not replace a call but patched other code then there will |
// be an unwanted return address left on the stack. Here we get rid of that. |
if (convert_call_to_jmp) { |