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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 783103003: Clobber non-live temporaries on some paths involving a possible slow-path allocation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: only clobber on slow path Created 6 years 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 | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 6a8e1b48cf903224f983d4ada849bad14e6524c4..b40fda4f6f040cd7636a1f25a6c346fff052abad 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -1882,6 +1882,9 @@ void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
locs()->live_registers()->Add(locs()->in(1));
}
+ // Manually preserve temp which could be clobbered on the slow path.
+ locs()->live_registers()->Add(locs()->temp(0));
Vyacheslav Egorov (Google) 2014/12/09 17:49:46 Actually I have been looking at this code and it d
zerny-google 2014/12/10 09:49:15 Your right, the updated patch set won't clobber te
+
{
__ Bind(&store_double);
EnsureMutableBox(compiler,
@@ -3800,6 +3803,9 @@ void LoadCodeUnitsInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
} else {
// If the value cannot fit in a smi then allocate a mint box for it.
Register temp = locs()->temp(0).reg();
+ // Temp register needs to be manually preserved on allocation slow-path.
+ locs()->live_registers()->Add(locs()->temp(0), kUnboxedInt32);
+
ASSERT(temp != result);
__ MoveRegister(temp, result);
__ SmiTag(result);
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698