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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 517343002: Ensure that BoxInt32 input is correctly preserved on the slow-path. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | « 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 0a334921a6dbd045f04eba30653d6972c9288da0..19ffac37acb9e35d70d7659d7e1301b0391c83cc 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -1851,6 +1851,12 @@ void StoreInstanceFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
Register temp2 = locs()->temp(1).reg();
FpuRegister fpu_temp = locs()->temp(2).fpu_reg();
+ if (ShouldEmitStoreBarrier()) {
+ // Value input is a writable register and should be manually preserved
+ // across allocation slow-path.
+ locs()->live_registers()->Add(locs()->in(1), kTagged);
+ }
+
Label store_pointer;
Label store_double;
Label store_float32x4;
@@ -6463,6 +6469,9 @@ void BoxInt32Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
Label done;
__ j(NO_OVERFLOW, &done);
// Allocate a mint.
+ // Value input is writable register and has to be manually preserved
+ // on the slow path.
+ locs()->live_registers()->Add(locs()->in(0), kUnboxedInt32);
BoxAllocationSlowPath::Allocate(
compiler, this, compiler->mint_class(), out, kNoRegister);
__ movl(FieldAddress(out, Mint::value_offset()), value);
« 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