| Index: src/x64/debug-x64.cc
|
| ===================================================================
|
| --- src/x64/debug-x64.cc (revision 15486)
|
| +++ src/x64/debug-x64.cc (working copy)
|
| @@ -95,6 +95,7 @@
|
|
|
|
|
| #define __ ACCESS_MASM(masm)
|
| +#define __q __
|
|
|
|
|
| static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
|
| @@ -126,12 +127,21 @@
|
| }
|
| // Store the 64-bit value as two smis.
|
| if ((non_object_regs & (1 << r)) != 0) {
|
| +#ifndef V8_TARGET_ARCH_X32
|
| __ movq(kScratchRegister, reg);
|
| __ Integer32ToSmi(reg, reg);
|
| __ push(reg);
|
| __ sar(kScratchRegister, Immediate(32));
|
| __ Integer32ToSmi(kScratchRegister, kScratchRegister);
|
| __ push(kScratchRegister);
|
| +#else
|
| + if (FLAG_debug_code) {
|
| + __ testl(reg, Immediate(0xc0000000));
|
| + __ Assert(zero, "Unable to encode value as smi");
|
| + }
|
| + __ Integer32ToSmi(reg, reg);
|
| + __ Push(reg);
|
| +#endif
|
| }
|
| }
|
|
|
| @@ -156,12 +166,17 @@
|
| }
|
| // Reconstruct the 64-bit value from two smis.
|
| if ((non_object_regs & (1 << r)) != 0) {
|
| +#ifndef V8_TARGET_ARCH_X32
|
| __ pop(kScratchRegister);
|
| __ SmiToInteger32(kScratchRegister, kScratchRegister);
|
| __ shl(kScratchRegister, Immediate(32));
|
| __ pop(reg);
|
| __ SmiToInteger32(reg, reg);
|
| __ or_(reg, kScratchRegister);
|
| +#else
|
| + __ Pop(reg);
|
| + __ SmiToInteger32(reg, reg);
|
| +#endif
|
| }
|
| }
|
|
|
| @@ -176,7 +191,7 @@
|
| // 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) {
|
| - __ addq(rsp, Immediate(kPointerSize));
|
| + __q addq(rsp, Immediate(kPointerSize));
|
| }
|
|
|
| // Now that the break point has been handled, resume normal execution by
|
| @@ -185,7 +200,11 @@
|
| ExternalReference after_break_target =
|
| ExternalReference(Debug_Address::AfterBreakTarget(), masm->isolate());
|
| __ movq(kScratchRegister, after_break_target);
|
| +#ifndef V8_TARGET_ARCH_X32
|
| __ jmp(Operand(kScratchRegister, 0));
|
| +#else
|
| + __ Jump(Operand(kScratchRegister, 0));
|
| +#endif
|
| }
|
|
|
|
|
| @@ -354,6 +373,7 @@
|
|
|
| const bool Debug::kFrameDropperSupported = true;
|
|
|
| +#undef __q
|
| #undef __
|
|
|
| #endif // ENABLE_DEBUGGER_SUPPORT
|
|
|