| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2223 intptr_t current_offset = 0; | 2223 intptr_t current_offset = 0; |
| 2224 while (current_offset + kWordSize < array_size) { | 2224 while (current_offset + kWordSize < array_size) { |
| 2225 __ strd(R6, Address(R8, current_offset)); | 2225 __ strd(R6, Address(R8, current_offset)); |
| 2226 current_offset += 2*kWordSize; | 2226 current_offset += 2*kWordSize; |
| 2227 } | 2227 } |
| 2228 while (current_offset < array_size) { | 2228 while (current_offset < array_size) { |
| 2229 __ str(R6, Address(R8, current_offset)); | 2229 __ str(R6, Address(R8, current_offset)); |
| 2230 current_offset += kWordSize; | 2230 current_offset += kWordSize; |
| 2231 } | 2231 } |
| 2232 } else { | 2232 } else { |
| 2233 Label init_loop; | 2233 __ InitializeFieldsNoBarrier(R0, R8, R3, R6, R7); |
| 2234 __ Bind(&init_loop); | |
| 2235 __ AddImmediate(R8, 2 * kWordSize); | |
| 2236 __ cmp(R8, Operand(R3)); | |
| 2237 __ strd(R6, Address(R8, -2 * kWordSize), LS); | |
| 2238 __ b(&init_loop, CC); | |
| 2239 __ str(R6, Address(R8, -2 * kWordSize), HI); | |
| 2240 } | 2234 } |
| 2241 } | 2235 } |
| 2242 __ b(done); | 2236 __ b(done); |
| 2243 } | 2237 } |
| 2244 | 2238 |
| 2245 | 2239 |
| 2246 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2240 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2247 const Register kLengthReg = R2; | 2241 const Register kLengthReg = R2; |
| 2248 const Register kElemTypeReg = R1; | 2242 const Register kElemTypeReg = R1; |
| 2249 const Register kResultReg = R0; | 2243 const Register kResultReg = R0; |
| (...skipping 4500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6750 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 6744 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
| 6751 #if defined(DEBUG) | 6745 #if defined(DEBUG) |
| 6752 __ LoadImmediate(R4, kInvalidObjectPointer); | 6746 __ LoadImmediate(R4, kInvalidObjectPointer); |
| 6753 __ LoadImmediate(R5, kInvalidObjectPointer); | 6747 __ LoadImmediate(R5, kInvalidObjectPointer); |
| 6754 #endif | 6748 #endif |
| 6755 } | 6749 } |
| 6756 | 6750 |
| 6757 } // namespace dart | 6751 } // namespace dart |
| 6758 | 6752 |
| 6759 #endif // defined TARGET_ARCH_ARM | 6753 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |