Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: src/debug/arm64/debug-arm64.cc

Issue 1834733002: Revert of [Interpreter] Adds support to fetch return value on break at return. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/debug/arm/debug-arm.cc ('k') | src/debug/debug.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 Register scratch = x10; 85 Register scratch = x10;
86 { 86 {
87 FrameScope scope(masm, StackFrame::INTERNAL); 87 FrameScope scope(masm, StackFrame::INTERNAL);
88 88
89 // Load padding words on stack. 89 // Load padding words on stack.
90 __ Mov(scratch, Smi::FromInt(LiveEdit::kFramePaddingValue)); 90 __ Mov(scratch, Smi::FromInt(LiveEdit::kFramePaddingValue));
91 __ PushMultipleTimes(scratch, LiveEdit::kFramePaddingInitialSize); 91 __ PushMultipleTimes(scratch, LiveEdit::kFramePaddingInitialSize);
92 __ Mov(scratch, Smi::FromInt(LiveEdit::kFramePaddingInitialSize)); 92 __ Mov(scratch, Smi::FromInt(LiveEdit::kFramePaddingInitialSize));
93 __ Push(scratch); 93 __ Push(scratch);
94 94
95 // Push arguments for DebugBreak call. 95 if (mode == SAVE_RESULT_REGISTER) __ Push(x0);
96 if (mode == SAVE_RESULT_REGISTER) { 96
97 // Break on return. 97 __ Mov(x0, 0); // No arguments.
98 __ Push(x0);
99 } else {
100 // Non-return breaks.
101 __ Push(masm->isolate()->factory()->the_hole_value());
102 }
103 __ Mov(x0, 1);
104 __ Mov(x1, ExternalReference(Runtime::FunctionForId(Runtime::kDebugBreak), 98 __ Mov(x1, ExternalReference(Runtime::FunctionForId(Runtime::kDebugBreak),
105 masm->isolate())); 99 masm->isolate()));
106 100
107 CEntryStub stub(masm->isolate(), 1); 101 CEntryStub stub(masm->isolate(), 1);
108 __ CallStub(&stub); 102 __ CallStub(&stub);
109 103
110 if (FLAG_debug_code) { 104 if (FLAG_debug_code) {
111 for (int i = 0; i < kNumJSCallerSaved; i++) { 105 for (int i = 0; i < kNumJSCallerSaved; i++) {
112 Register reg = Register::XRegFromCode(JSCallerSavedCode(i)); 106 Register reg = Register::XRegFromCode(JSCallerSavedCode(i));
113 // Do not clobber x0 if SAVE_RESULT_REGISTER is set. It will 107 __ Mov(reg, Operand(kDebugZapValue));
114 // contain return value of the function.
115 if (!(reg.is(x0) && SAVE_RESULT_REGISTER)) {
116 __ Mov(reg, Operand(kDebugZapValue));
117 }
118 } 108 }
119 } 109 }
120 110
111 // Restore the register values from the expression stack.
112 if (mode == SAVE_RESULT_REGISTER) __ Pop(x0);
113
121 // Don't bother removing padding bytes pushed on the stack 114 // Don't bother removing padding bytes pushed on the stack
122 // as the frame is going to be restored right away. 115 // as the frame is going to be restored right away.
123 116
124 // Leave the internal frame. 117 // Leave the internal frame.
125 } 118 }
126 119
127 // Now that the break point has been handled, resume normal execution by 120 // Now that the break point has been handled, resume normal execution by
128 // jumping to the target address intended by the caller and that was 121 // jumping to the target address intended by the caller and that was
129 // overwritten by the address of DebugBreakXXX. 122 // overwritten by the address of DebugBreakXXX.
130 ExternalReference after_break_target = 123 ExternalReference after_break_target =
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 __ Br(scratch); 158 __ Br(scratch);
166 } 159 }
167 160
168 161
169 const bool LiveEdit::kFrameDropperSupported = true; 162 const bool LiveEdit::kFrameDropperSupported = true;
170 163
171 } // namespace internal 164 } // namespace internal
172 } // namespace v8 165 } // namespace v8
173 166
174 #endif // V8_TARGET_ARCH_ARM64 167 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/debug/arm/debug-arm.cc ('k') | src/debug/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698