| 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 __ bne(CMPRES, ZR, &fall_through); | 234 __ bne(CMPRES, ZR, &fall_through); |
| 235 | 235 |
| 236 __ lw(T0, Address(SP, 2 * kWordSize)); // Array. | 236 __ lw(T0, Address(SP, 2 * kWordSize)); // Array. |
| 237 // Range check. | 237 // Range check. |
| 238 __ lw(T3, FieldAddress(T0, Array::length_offset())); // Array length. | 238 __ lw(T3, FieldAddress(T0, Array::length_offset())); // Array length. |
| 239 // Runtime throws exception. | 239 // Runtime throws exception. |
| 240 __ BranchUnsignedGreaterEqual(T1, T3, &fall_through); | 240 __ BranchUnsignedGreaterEqual(T1, T3, &fall_through); |
| 241 | 241 |
| 242 // Note that T1 is Smi, i.e, times 2. | 242 // Note that T1 is Smi, i.e, times 2. |
| 243 ASSERT(kSmiTagShift == 1); | 243 ASSERT(kSmiTagShift == 1); |
| 244 // Destroy T2 as we will not continue in the function. | |
| 245 __ lw(T2, Address(SP, 0 * kWordSize)); // Value. | 244 __ lw(T2, Address(SP, 0 * kWordSize)); // Value. |
| 246 __ sll(T1, T1, 1); // T1 is Smi. | 245 __ sll(T1, T1, 1); // T1 is Smi. |
| 247 __ addu(T1, T0, T1); | 246 __ addu(T1, T0, T1); |
| 248 __ StoreIntoObject(T0, | 247 __ StoreIntoObject(T0, |
| 249 FieldAddress(T1, Array::data_offset()), | 248 FieldAddress(T1, Array::data_offset()), |
| 250 T2); | 249 T2); |
| 251 // Caller is responsible for preserving the value if necessary. | 250 // Caller is responsible for preserving the value if necessary. |
| 252 __ Ret(); | 251 __ Ret(); |
| 253 __ Bind(&fall_through); | 252 __ Bind(&fall_through); |
| 254 return false; | 253 return false; |
| (...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1770 __ Bind(&ok); | 1769 __ Bind(&ok); |
| 1771 __ Ret(); | 1770 __ Ret(); |
| 1772 | 1771 |
| 1773 __ Bind(&fall_through); | 1772 __ Bind(&fall_through); |
| 1774 return false; | 1773 return false; |
| 1775 } | 1774 } |
| 1776 | 1775 |
| 1777 } // namespace dart | 1776 } // namespace dart |
| 1778 | 1777 |
| 1779 #endif // defined TARGET_ARCH_MIPS | 1778 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |