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/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
9 | 9 |
10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 __ b(&fall_through, CS); | 236 __ b(&fall_through, CS); |
237 | 237 |
238 // Note that R1 is Smi, i.e, times 2. | 238 // Note that R1 is Smi, i.e, times 2. |
239 ASSERT(kSmiTagShift == 1); | 239 ASSERT(kSmiTagShift == 1); |
240 // Destroy R2 as we will not continue in the function. | 240 // Destroy R2 as we will not continue in the function. |
241 __ ldr(R2, Address(SP, 0 * kWordSize)); // Value. | 241 __ ldr(R2, Address(SP, 0 * kWordSize)); // Value. |
242 __ add(R1, R0, ShifterOperand(R1, LSL, 1)); // R1 is Smi. | 242 __ add(R1, R0, ShifterOperand(R1, LSL, 1)); // R1 is Smi. |
243 __ StoreIntoObject(R0, | 243 __ StoreIntoObject(R0, |
244 FieldAddress(R1, Array::data_offset()), | 244 FieldAddress(R1, Array::data_offset()), |
245 R2); | 245 R2); |
246 // Caller is responsible of preserving the value if necessary. | 246 // Caller is responsible for preserving the value if necessary. |
247 __ Ret(); | 247 __ Ret(); |
248 __ Bind(&fall_through); | 248 __ Bind(&fall_through); |
249 return false; | 249 return false; |
250 } | 250 } |
251 | 251 |
252 | 252 |
253 // Allocate a GrowableObjectArray using the backing array specified. | 253 // Allocate a GrowableObjectArray using the backing array specified. |
254 // On stack: type argument (+1), data (+0). | 254 // On stack: type argument (+1), data (+0). |
255 bool Intrinsifier::GrowableArray_Allocate(Assembler* assembler) { | 255 bool Intrinsifier::GrowableArray_Allocate(Assembler* assembler) { |
256 // The newly allocated object is returned in R0. | 256 // The newly allocated object is returned in R0. |
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 __ Bind(&ok); | 1687 __ Bind(&ok); |
1688 __ Ret(); | 1688 __ Ret(); |
1689 | 1689 |
1690 __ Bind(&fall_through); | 1690 __ Bind(&fall_through); |
1691 return false; | 1691 return false; |
1692 } | 1692 } |
1693 | 1693 |
1694 } // namespace dart | 1694 } // namespace dart |
1695 | 1695 |
1696 #endif // defined TARGET_ARCH_ARM | 1696 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |