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 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1242 const Instance& a_value = Instance::Handle(random_A_field.value()); | 1242 const Instance& a_value = Instance::Handle(random_A_field.value()); |
1243 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); | 1243 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); |
1244 // 'a_int_value' is a mask. | 1244 // 'a_int_value' is a mask. |
1245 ASSERT(Utils::IsUint(32, a_int_value)); | 1245 ASSERT(Utils::IsUint(32, a_int_value)); |
1246 int32_t a_int32_value = static_cast<int32_t>(a_int_value); | 1246 int32_t a_int32_value = static_cast<int32_t>(a_int_value); |
1247 | 1247 |
1248 __ ldr(R0, Address(SP, 0 * kWordSize)); // Receiver. | 1248 __ ldr(R0, Address(SP, 0 * kWordSize)); // Receiver. |
1249 __ ldr(R1, FieldAddress(R0, state_field.Offset())); // Field '_state'. | 1249 __ ldr(R1, FieldAddress(R0, state_field.Offset())); // Field '_state'. |
1250 // Addresses of _state[0] and _state[1]. | 1250 // Addresses of _state[0] and _state[1]. |
1251 | 1251 |
1252 const int64_t disp_0 = | 1252 const int64_t disp_0 = Instance::DataOffsetFor(kTypedDataUint32ArrayCid); |
1253 FlowGraphCompiler::DataOffsetFor(kTypedDataUint32ArrayCid); | 1253 const int64_t disp_1 = disp_0 + |
1254 | 1254 Instance::ElementSizeFor(kTypedDataUint32ArrayCid); |
1255 const int64_t disp_1 = | |
1256 FlowGraphCompiler::ElementSizeFor(kTypedDataUint32ArrayCid) + | |
1257 FlowGraphCompiler::DataOffsetFor(kTypedDataUint32ArrayCid); | |
1258 | 1255 |
1259 __ LoadImmediate(R0, a_int32_value); | 1256 __ LoadImmediate(R0, a_int32_value); |
1260 __ LoadFromOffset(kWord, R2, R1, disp_0 - kHeapObjectTag); | 1257 __ LoadFromOffset(kWord, R2, R1, disp_0 - kHeapObjectTag); |
1261 __ LoadFromOffset(kWord, R3, R1, disp_1 - kHeapObjectTag); | 1258 __ LoadFromOffset(kWord, R3, R1, disp_1 - kHeapObjectTag); |
1262 __ mov(R6, ShifterOperand(0)); // Zero extend unsigned _state[kSTATE_HI]. | 1259 __ mov(R6, ShifterOperand(0)); // Zero extend unsigned _state[kSTATE_HI]. |
1263 // Unsigned 32-bit multiply and 64-bit accumulate into R6:R3. | 1260 // Unsigned 32-bit multiply and 64-bit accumulate into R6:R3. |
1264 __ umlal(R3, R6, R0, R2); // R6:R3 <- R6:R3 + R0 * R2. | 1261 __ umlal(R3, R6, R0, R2); // R6:R3 <- R6:R3 + R0 * R2. |
1265 __ StoreToOffset(kWord, R3, R1, disp_0 - kHeapObjectTag); | 1262 __ StoreToOffset(kWord, R3, R1, disp_0 - kHeapObjectTag); |
1266 __ StoreToOffset(kWord, R6, R1, disp_1 - kHeapObjectTag); | 1263 __ StoreToOffset(kWord, R6, R1, disp_1 - kHeapObjectTag); |
1267 __ Ret(); | 1264 __ Ret(); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 Isolate* isolate = Isolate::Current(); | 1661 Isolate* isolate = Isolate::Current(); |
1665 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); | 1662 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); |
1666 // Set return value to Isolate::current_tag_. | 1663 // Set return value to Isolate::current_tag_. |
1667 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); | 1664 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); |
1668 __ Ret(); | 1665 __ Ret(); |
1669 } | 1666 } |
1670 | 1667 |
1671 } // namespace dart | 1668 } // namespace dart |
1672 | 1669 |
1673 #endif // defined TARGET_ARCH_ARM | 1670 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |