Index: runtime/vm/intermediate_language_arm.cc |
=================================================================== |
--- runtime/vm/intermediate_language_arm.cc (revision 41914) |
+++ runtime/vm/intermediate_language_arm.cc (working copy) |
@@ -2213,14 +2213,17 @@ |
// R3: new object end address. |
// R8: iterator which initially points to the start of the variable |
// data area to be initialized. |
- // R6, R7: null |
+ // R6: null |
if (num_elements > 0) { |
const intptr_t array_size = instance_size - sizeof(RawArray); |
__ LoadImmediate(R6, reinterpret_cast<intptr_t>(Object::null())); |
- __ mov(R7, Operand(R6)); |
+ if (num_elements >= 2) { |
+ __ mov(R7, Operand(R6)); |
+ } |
Ivan Posva
2014/12/08 19:27:56
Can you make sure to clobber R7 with RAW_NULL (0x1
koda
2014/12/08 22:23:42
Done.
|
__ AddImmediate(R8, R0, sizeof(RawArray) - kHeapObjectTag); |
if (array_size < (kInlineArraySize * kWordSize)) { |
- __ InitializeFieldsNoBarrierUnrolled(R0, R8, num_elements, R6, R7); |
+ __ InitializeFieldsNoBarrierUnrolled(R0, R8, 0, num_elements * kWordSize, |
+ R6, R7); |
} else { |
__ InitializeFieldsNoBarrier(R0, R8, R3, R6, R7); |
} |