Chromium Code Reviews| Index: src/ppc/codegen-ppc.cc |
| diff --git a/src/ppc/codegen-ppc.cc b/src/ppc/codegen-ppc.cc |
| index 5642e91f9d8244e2d142563caa945bbfb76472bc..1f9ea1d5ff1eb39eae5abc7453e5552b5cab886f 100644 |
| --- a/src/ppc/codegen-ppc.cc |
| +++ b/src/ppc/codegen-ppc.cc |
| @@ -185,6 +185,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( |
| __ SmiToDoubleArrayOffset(scratch3, length); |
| __ addi(scratch3, scratch3, Operand(FixedDoubleArray::kHeaderSize)); |
| __ Allocate(scratch3, array, scratch4, scratch2, fail, DOUBLE_ALIGNMENT); |
| + __ subi(array, array, Operand(kHeapObjectTag)); |
| // array: destination FixedDoubleArray, not tagged as heap object. |
| // elements: source FixedArray. |
| @@ -313,12 +314,14 @@ void ElementsTransitionGenerator::GenerateDoubleToObject( |
| __ add(array_size, 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)); |
| - __ addi(array, array, Operand(kHeapObjectTag)); |
| + __ StoreP(length, FieldMemOperand(array, |
| + FixedDoubleArray::kLengthOffset), r0); |
| + __ StoreP(scratch, FieldMemOperand(array, HeapObject::kMapOffset), r0); |
| + |
| + __ subi(array, array, Operand(kHeapObjectTag)); |
|
MTBrandyberry
2016/04/27 14:13:06
The code below assume array is tagged. This line
|
| // Prepare for conversion loop. |
| Register src_elements = elements; |