diff options
| author | 2016-07-08 12:51:01 +0000 | |
|---|---|---|
| committer | 2016-07-08 12:51:02 +0000 | |
| commit | 2e7acaffda05db1df6e0631468f10726e898a20a (patch) | |
| tree | 855e68d438be50fc126d48e6e2fee334169a8e92 /compiler/optimizing/intrinsics_arm.cc | |
| parent | 7d14037d259c4f0adadd97adab11b36cb7f2fd18 (diff) | |
| parent | fea1abd660cc89b31d121c8700fae8d804178391 (diff) | |
Merge "Implement System.arraycopy intrinsic on x86."
Diffstat (limited to 'compiler/optimizing/intrinsics_arm.cc')
| -rw-r--r-- | compiler/optimizing/intrinsics_arm.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/optimizing/intrinsics_arm.cc b/compiler/optimizing/intrinsics_arm.cc index bfe4956692..579fb9d3bb 100644 --- a/compiler/optimizing/intrinsics_arm.cc +++ b/compiler/optimizing/intrinsics_arm.cc @@ -1365,7 +1365,6 @@ static void CheckPosition(ArmAssembler* assembler, Register input, Location length, SlowPathCode* slow_path, - Register input_len, Register temp, bool length_is_input_length = false) { // Where is the length in the Array? @@ -1386,8 +1385,8 @@ static void CheckPosition(ArmAssembler* assembler, } } else { // Check that length(input) >= pos. - __ LoadFromOffset(kLoadWord, input_len, input, length_offset); - __ subs(temp, input_len, ShifterOperand(pos_const)); + __ LoadFromOffset(kLoadWord, temp, input, length_offset); + __ subs(temp, temp, ShifterOperand(pos_const)); __ b(slow_path->GetEntryLabel(), LT); // Check that (length(input) - pos) >= length. @@ -1518,7 +1517,6 @@ void IntrinsicCodeGeneratorARM::VisitSystemArrayCopy(HInvoke* invoke) { length, slow_path, temp1, - temp2, optimizations.GetCountIsSourceLength()); // Validity checks: dest. @@ -1528,7 +1526,6 @@ void IntrinsicCodeGeneratorARM::VisitSystemArrayCopy(HInvoke* invoke) { length, slow_path, temp1, - temp2, optimizations.GetCountIsDestinationLength()); if (!optimizations.GetDoesNotNeedTypeCheck()) { @@ -1606,7 +1603,7 @@ void IntrinsicCodeGeneratorARM::VisitSystemArrayCopy(HInvoke* invoke) { // Compute base source address, base destination address, and end source address. - uint32_t element_size = sizeof(int32_t); + int32_t element_size = Primitive::ComponentSize(Primitive::kPrimNot); uint32_t offset = mirror::Array::DataOffset(element_size).Uint32Value(); if (src_pos.IsConstant()) { int32_t constant = src_pos.GetConstant()->AsIntConstant()->GetValue(); @@ -1632,8 +1629,7 @@ void IntrinsicCodeGeneratorARM::VisitSystemArrayCopy(HInvoke* invoke) { } // Iterate over the arrays and do a raw copy of the objects. We don't need to - // poison/unpoison, nor do any read barrier as the next uses of the destination - // array will do it. + // poison/unpoison. Label loop, done; __ cmp(temp1, ShifterOperand(temp3)); __ b(&done, EQ); |