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

Unified Diff: runtime/vm/stub_code_arm.cc

Issue 747463002: Fix allocation stats bug on ARM; add unit test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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/heap_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm.cc
===================================================================
--- runtime/vm/stub_code_arm.cc (revision 41855)
+++ runtime/vm/stub_code_arm.cc (working copy)
@@ -690,21 +690,23 @@
// Initialize all array elements to raw_null.
// R0: new object start as a tagged pointer.
// R3: allocation stats address.
+ // R4, R5: null
+ // R6: iterator which initially points to the start of the variable
+ // data area to be initialized.
// R7: new object end address.
- // R8: iterator which initially points to the start of the variable
- // data area to be initialized.
- // R4, R5: null
+ // R8: allocation size.
+
__ LoadImmediate(R4, reinterpret_cast<intptr_t>(Object::null()));
__ mov(R5, Operand(R4));
- __ AddImmediate(R8, R0, sizeof(RawArray) - kHeapObjectTag);
+ __ AddImmediate(R6, R0, sizeof(RawArray) - kHeapObjectTag);
Label init_loop;
__ Bind(&init_loop);
- __ AddImmediate(R8, 2 * kWordSize);
- __ cmp(R8, Operand(R7));
- __ strd(R4, Address(R8, -2 * kWordSize), LS);
+ __ AddImmediate(R6, 2 * kWordSize);
+ __ cmp(R6, Operand(R7));
+ __ strd(R4, Address(R6, -2 * kWordSize), LS);
__ b(&init_loop, CC);
- __ str(R4, Address(R8, -2 * kWordSize), HI);
+ __ str(R4, Address(R6, -2 * kWordSize), HI);
__ IncrementAllocationStatsWithSize(R3, R8, cid, space);
__ Ret(); // Returns the newly allocated object in R0.
« no previous file with comments | « runtime/vm/heap_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698