Reviewers: ulan, jochen,

Description:
A64: In the Simulator, corrupt caller-saved registers after runtime printf call.

Please review this at https://codereview.chromium.org/203603002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+5, -2 lines):
  M src/a64/simulator-a64.cc


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));


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to