Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: runtime/vm/intermediate_language_arm.cc

Issue 752633002: arm: Move unrolled array initialization to Assembler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2202 matching lines...) Expand 10 before | Expand all | Expand 10 after
2213 // R3: new object end address. 2213 // R3: new object end address.
2214 // R8: iterator which initially points to the start of the variable 2214 // R8: iterator which initially points to the start of the variable
2215 // data area to be initialized. 2215 // data area to be initialized.
2216 // R6, R7: null 2216 // R6, R7: null
2217 if (num_elements > 0) { 2217 if (num_elements > 0) {
2218 const intptr_t array_size = instance_size - sizeof(RawArray); 2218 const intptr_t array_size = instance_size - sizeof(RawArray);
2219 __ LoadImmediate(R6, reinterpret_cast<intptr_t>(Object::null())); 2219 __ LoadImmediate(R6, reinterpret_cast<intptr_t>(Object::null()));
2220 __ mov(R7, Operand(R6)); 2220 __ mov(R7, Operand(R6));
2221 __ AddImmediate(R8, R0, sizeof(RawArray) - kHeapObjectTag); 2221 __ AddImmediate(R8, R0, sizeof(RawArray) - kHeapObjectTag);
2222 if (array_size < (kInlineArraySize * kWordSize)) { 2222 if (array_size < (kInlineArraySize * kWordSize)) {
2223 intptr_t current_offset = 0; 2223 __ InitializeFieldsNoBarrierUnrolled(R0, R8, num_elements, R6, R7);
2224 while (current_offset + kWordSize < array_size) {
2225 __ strd(R6, Address(R8, current_offset));
2226 current_offset += 2*kWordSize;
2227 }
2228 while (current_offset < array_size) {
2229 __ str(R6, Address(R8, current_offset));
2230 current_offset += kWordSize;
2231 }
2232 } else { 2224 } else {
2233 __ InitializeFieldsNoBarrier(R0, R8, R3, R6, R7); 2225 __ InitializeFieldsNoBarrier(R0, R8, R3, R6, R7);
2234 } 2226 }
2235 } 2227 }
2236 __ b(done); 2228 __ b(done);
2237 } 2229 }
2238 2230
2239 2231
2240 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2232 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2241 const Register kLengthReg = R2; 2233 const Register kLengthReg = R2;
(...skipping 4502 matching lines...) Expand 10 before | Expand all | Expand 10 after
6744 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 6736 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
6745 #if defined(DEBUG) 6737 #if defined(DEBUG)
6746 __ LoadImmediate(R4, kInvalidObjectPointer); 6738 __ LoadImmediate(R4, kInvalidObjectPointer);
6747 __ LoadImmediate(R5, kInvalidObjectPointer); 6739 __ LoadImmediate(R5, kInvalidObjectPointer);
6748 #endif 6740 #endif
6749 } 6741 }
6750 6742
6751 } // namespace dart 6743 } // namespace dart
6752 6744
6753 #endif // defined TARGET_ARCH_ARM 6745 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698