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

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

Issue 1842683002: [Interpreter] Adds support to fetch return value on break at return. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed failures on linux-nosnap-dbg Created 4 years, 8 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/mips64/debug-mips64.cc ('k') | src/debug/s390/debug-s390.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 76 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
77 77
78 // Load padding words on stack. 78 // Load padding words on stack.
79 __ LoadSmiLiteral(ip, Smi::FromInt(LiveEdit::kFramePaddingValue)); 79 __ LoadSmiLiteral(ip, Smi::FromInt(LiveEdit::kFramePaddingValue));
80 for (int i = 0; i < LiveEdit::kFramePaddingInitialSize; i++) { 80 for (int i = 0; i < LiveEdit::kFramePaddingInitialSize; i++) {
81 __ push(ip); 81 __ push(ip);
82 } 82 }
83 __ LoadSmiLiteral(ip, Smi::FromInt(LiveEdit::kFramePaddingInitialSize)); 83 __ LoadSmiLiteral(ip, Smi::FromInt(LiveEdit::kFramePaddingInitialSize));
84 __ push(ip); 84 __ push(ip);
85 85
86 if (mode == SAVE_RESULT_REGISTER) __ push(r3); 86 // Push arguments for DebugBreak call.
87 87 if (mode == SAVE_RESULT_REGISTER) {
88 __ mov(r3, Operand::Zero()); // no arguments 88 // Break on return.
89 __ push(r3);
90 } else {
91 // Non-return breaks.
92 __ Push(masm->isolate()->factory()->the_hole_value());
93 }
94 __ mov(r3, Operand(1));
89 __ mov(r4, 95 __ mov(r4,
90 Operand(ExternalReference( 96 Operand(ExternalReference(
91 Runtime::FunctionForId(Runtime::kDebugBreak), masm->isolate()))); 97 Runtime::FunctionForId(Runtime::kDebugBreak), masm->isolate())));
92 98
93 CEntryStub ceb(masm->isolate(), 1); 99 CEntryStub ceb(masm->isolate(), 1);
94 __ CallStub(&ceb); 100 __ CallStub(&ceb);
95 101
96 if (FLAG_debug_code) { 102 if (FLAG_debug_code) {
97 for (int i = 0; i < kNumJSCallerSaved; i++) { 103 for (int i = 0; i < kNumJSCallerSaved; i++) {
98 Register reg = {JSCallerSavedCode(i)}; 104 Register reg = {JSCallerSavedCode(i)};
99 __ mov(reg, Operand(kDebugZapValue)); 105 // Do not clobber r3 if mode is SAVE_RESULT_REGISTER. It will
106 // contain return value of the function.
107 if (!(reg.is(r3) && (mode == SAVE_RESULT_REGISTER))) {
108 __ mov(reg, Operand(kDebugZapValue));
109 }
100 } 110 }
101 } 111 }
102 112
103 if (mode == SAVE_RESULT_REGISTER) __ pop(r3);
104
105 // Don't bother removing padding bytes pushed on the stack 113 // Don't bother removing padding bytes pushed on the stack
106 // as the frame is going to be restored right away. 114 // as the frame is going to be restored right away.
107 115
108 // Leave the internal frame. 116 // Leave the internal frame.
109 } 117 }
110 118
111 // Now that the break point has been handled, resume normal execution by 119 // Now that the break point has been handled, resume normal execution by
112 // jumping to the target address intended by the caller and that was 120 // jumping to the target address intended by the caller and that was
113 // overwritten by the address of DebugBreakXXX. 121 // overwritten by the address of DebugBreakXXX.
114 ExternalReference after_break_target = 122 ExternalReference after_break_target =
(...skipping 30 matching lines...) Expand all
145 } 153 }
146 154
147 155
148 const bool LiveEdit::kFrameDropperSupported = true; 156 const bool LiveEdit::kFrameDropperSupported = true;
149 157
150 #undef __ 158 #undef __
151 } // namespace internal 159 } // namespace internal
152 } // namespace v8 160 } // namespace v8
153 161
154 #endif // V8_TARGET_ARCH_PPC 162 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/debug/mips64/debug-mips64.cc ('k') | src/debug/s390/debug-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698