Index: src/s390/codegen-s390.cc |
diff --git a/src/s390/codegen-s390.cc b/src/s390/codegen-s390.cc |
index 6636a7ca1d00e1e850e672a30b8e20936c79c301..fe94c94a50a820a0f34ec1ba0207fb3a08dc8e0f 100644 |
--- a/src/s390/codegen-s390.cc |
+++ b/src/s390/codegen-s390.cc |
@@ -172,7 +172,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( |
__ SmiToDoubleArrayOffset(r14, length); |
__ AddP(r14, Operand(FixedDoubleArray::kHeaderSize)); |
__ Allocate(r14, array, r9, scratch2, &gc_required, DOUBLE_ALIGNMENT); |
- |
+ __ SubP(array, array, Operand(kHeapObjectTag)); |
// Set destination FixedDoubleArray's length and map. |
__ LoadRoot(scratch2, Heap::kFixedDoubleArrayMapRootIndex); |
__ StoreP(length, MemOperand(array, FixedDoubleArray::kLengthOffset)); |
@@ -302,12 +302,12 @@ void ElementsTransitionGenerator::GenerateDoubleToObject( |
__ AddP(array_size, r0); |
__ Allocate(array_size, array, allocate_scratch, scratch, &gc_required, |
NO_ALLOCATION_FLAGS); |
- // array: destination FixedArray, not tagged as heap object |
+ // array: destination FixedArray, tagged as heap object |
// Set destination FixedDoubleArray's length and map. |
__ LoadRoot(scratch, Heap::kFixedArrayMapRootIndex); |
- __ StoreP(length, MemOperand(array, FixedDoubleArray::kLengthOffset)); |
- __ StoreP(scratch, MemOperand(array, HeapObject::kMapOffset)); |
- __ AddP(array, Operand(kHeapObjectTag)); |
+ __ StoreP(length, FieldMemOperand(array, FixedDoubleArray::kLengthOffset), |
+ r0); |
+ __ StoreP(scratch, FieldMemOperand(array, HeapObject::kMapOffset), r0); |
// Prepare for conversion loop. |
Register src_elements = elements; |