| Index: src/x64/macro-assembler-x64.cc
|
| ===================================================================
|
| --- src/x64/macro-assembler-x64.cc (revision 3132)
|
| +++ src/x64/macro-assembler-x64.cc (working copy)
|
| @@ -1787,7 +1787,9 @@
|
| }
|
|
|
|
|
| -void MacroAssembler::EnterExitFrame(ExitFrame::Mode mode, int result_size) {
|
| +void MacroAssembler::EnterExitFrame(StackFrame::Type type, int result_size) {
|
| + ASSERT(type == StackFrame::EXIT || type == StackFrame::EXIT_DEBUG);
|
| +
|
| // Setup the frame structure on the stack.
|
| // All constants are relative to the frame pointer of the exit frame.
|
| ASSERT(ExitFrameConstants::kCallerSPDisplacement == +2 * kPointerSize);
|
| @@ -1799,12 +1801,7 @@
|
| // Reserve room for entry stack pointer and push the debug marker.
|
| ASSERT(ExitFrameConstants::kSPOffset == -1 * kPointerSize);
|
| push(Immediate(0)); // saved entry sp, patched before call
|
| - if (mode == ExitFrame::MODE_DEBUG) {
|
| - push(Immediate(0));
|
| - } else {
|
| - movq(kScratchRegister, CodeObject(), RelocInfo::EMBEDDED_OBJECT);
|
| - push(kScratchRegister);
|
| - }
|
| + push(Immediate(type == StackFrame::EXIT_DEBUG ? 1 : 0));
|
|
|
| // Save the frame pointer and the context in top.
|
| ExternalReference c_entry_fp_address(Top::k_c_entry_fp_address);
|
| @@ -1824,7 +1821,7 @@
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| // Save the state of all registers to the stack from the memory
|
| // location. This is needed to allow nested break points.
|
| - if (mode == ExitFrame::MODE_DEBUG) {
|
| + if (type == StackFrame::EXIT_DEBUG) {
|
| // TODO(1243899): This should be symmetric to
|
| // CopyRegistersFromStackToMemory() but it isn't! esp is assumed
|
| // correct here, but computed for the other call. Very error
|
| @@ -1863,17 +1860,17 @@
|
| }
|
|
|
|
|
| -void MacroAssembler::LeaveExitFrame(ExitFrame::Mode mode, int result_size) {
|
| +void MacroAssembler::LeaveExitFrame(StackFrame::Type type, int result_size) {
|
| // Registers:
|
| // r15 : argv
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| // Restore the memory copy of the registers by digging them out from
|
| // the stack. This is needed to allow nested break points.
|
| - if (mode == ExitFrame::MODE_DEBUG) {
|
| + if (type == StackFrame::EXIT_DEBUG) {
|
| // It's okay to clobber register rbx below because we don't need
|
| // the function pointer after this.
|
| const int kCallerSavedSize = kNumJSCallerSaved * kPointerSize;
|
| - int kOffset = ExitFrameConstants::kCodeOffset - kCallerSavedSize;
|
| + int kOffset = ExitFrameConstants::kDebugMarkOffset - kCallerSavedSize;
|
| lea(rbx, Operand(rbp, kOffset));
|
| CopyRegistersFromStackToMemory(rbx, rcx, kJSCallerSaved);
|
| }
|
|
|