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

Unified Diff: src/a64/simulator-a64.cc

Issue 203603002: A64: In the Simulator, corrupt caller-saved registers after runtime printf call. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/simulator-a64.cc
diff --git a/src/a64/simulator-a64.cc b/src/a64/simulator-a64.cc
index 3801bf7514f46dfcadf50bb609d31bd32bcdc535..f2e7b67b2f0aae8cd4d7690b134a17f108eea7bd 100644
--- a/src/a64/simulator-a64.cc
+++ b/src/a64/simulator-a64.cc
@@ -3631,9 +3631,12 @@ void Simulator::VisitException(Instruction* instr) {
result = fprintf(stream_, "%s", format);
}
fputs(clr_normal, stream_);
- set_xreg(0, result);
- // TODO(jbramley): Consider clobbering all caller-saved registers here.
+#ifdef DEBUG
+ CorruptAllCallerSavedCPURegisters();
+#endif
+
+ set_xreg(0, result);
// The printf parameters are inlined in the code, so skip them.
set_pc(pc_->InstructionAtOffset(kPrintfLength));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698