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

Unified Diff: src/debug/s390/debug-s390.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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/ppc/debug-ppc.cc ('k') | src/debug/x64/debug-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/s390/debug-s390.cc
diff --git a/src/debug/s390/debug-s390.cc b/src/debug/s390/debug-s390.cc
index 8165bf98741b91775c02e0f82abc4cb542ab7a8a..c6764c2dcaa32a764f8202ecf210a212ee014da0 100644
--- a/src/debug/s390/debug-s390.cc
+++ b/src/debug/s390/debug-s390.cc
@@ -88,9 +88,15 @@ void DebugCodegen::GenerateDebugBreakStub(MacroAssembler* masm,
__ LoadSmiLiteral(ip, Smi::FromInt(LiveEdit::kFramePaddingInitialSize));
__ push(ip);
- if (mode == SAVE_RESULT_REGISTER) __ push(r2);
-
- __ mov(r2, Operand::Zero()); // no arguments
+ // Push arguments for DebugBreak call.
+ if (mode == SAVE_RESULT_REGISTER) {
+ // Break on return.
+ __ push(r2);
+ } else {
+ // Non-return breaks.
+ __ Push(masm->isolate()->factory()->the_hole_value());
+ }
+ __ mov(r2, Operand(1));
__ mov(r3,
Operand(ExternalReference(
Runtime::FunctionForId(Runtime::kDebugBreak), masm->isolate())));
@@ -101,12 +107,14 @@ void DebugCodegen::GenerateDebugBreakStub(MacroAssembler* masm,
if (FLAG_debug_code) {
for (int i = 0; i < kNumJSCallerSaved; i++) {
Register reg = {JSCallerSavedCode(i)};
- __ mov(reg, Operand(kDebugZapValue));
+ // Do not clobber r2 if mode is SAVE_RESULT_REGISTER. It will
+ // contain return value of the function.
+ if (!(reg.is(r2) && (mode == SAVE_RESULT_REGISTER))) {
+ __ mov(reg, Operand(kDebugZapValue));
+ }
}
}
- if (mode == SAVE_RESULT_REGISTER) __ pop(r2);
-
// Don't bother removing padding bytes pushed on the stack
// as the frame is going to be restored right away.
« no previous file with comments | « src/debug/ppc/debug-ppc.cc ('k') | src/debug/x64/debug-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698