Index: src/debug/x64/debug-x64.cc |
diff --git a/src/debug/x64/debug-x64.cc b/src/debug/x64/debug-x64.cc |
index 46805963220a9a65cab7ed48bc7aec27e1e70358..094e7b608ece3dc54ac5f1f708a057b62854a9cf 100644 |
--- a/src/debug/x64/debug-x64.cc |
+++ b/src/debug/x64/debug-x64.cc |
@@ -69,15 +69,9 @@ |
} |
__ Push(Smi::FromInt(LiveEdit::kFramePaddingInitialSize)); |
- // Push arguments for DebugBreak call. |
- if (mode == SAVE_RESULT_REGISTER) { |
- // Break on return. |
- __ Push(rax); |
- } else { |
- // Non-return breaks. |
- __ Push(masm->isolate()->factory()->the_hole_value()); |
- } |
- __ Set(rax, 1); |
+ if (mode == SAVE_RESULT_REGISTER) __ Push(rax); |
+ |
+ __ Set(rax, 0); // No arguments (argc == 0). |
__ Move(rbx, ExternalReference(Runtime::FunctionForId(Runtime::kDebugBreak), |
masm->isolate())); |
@@ -87,13 +81,11 @@ |
if (FLAG_debug_code) { |
for (int i = 0; i < kNumJSCallerSaved; ++i) { |
Register reg = {JSCallerSavedCode(i)}; |
- // Do not clobber rax if SAVE_RESULT_REGISTER is set. It will |
- // contain return value of the function. |
- if (!(reg.is(rax) && SAVE_RESULT_REGISTER)) { |
- __ Set(reg, kDebugZapValue); |
- } |
+ __ Set(reg, kDebugZapValue); |
} |
} |
+ |
+ if (mode == SAVE_RESULT_REGISTER) __ Pop(rax); |
// Read current padding counter and skip corresponding number of words. |
__ Pop(kScratchRegister); |