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

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

Issue 294223003: Last cross-platform cleanup in preparation of improved ARM code for indexed (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 months 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/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | 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_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 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 const Instance& a_value = Instance::Handle(random_A_field.value()); 1268 const Instance& a_value = Instance::Handle(random_A_field.value());
1269 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); 1269 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value();
1270 // 'a_int_value' is a mask. 1270 // 'a_int_value' is a mask.
1271 ASSERT(Utils::IsUint(32, a_int_value)); 1271 ASSERT(Utils::IsUint(32, a_int_value));
1272 int32_t a_int32_value = static_cast<int32_t>(a_int_value); 1272 int32_t a_int32_value = static_cast<int32_t>(a_int_value);
1273 1273
1274 __ lw(T0, Address(SP, 0 * kWordSize)); // Receiver. 1274 __ lw(T0, Address(SP, 0 * kWordSize)); // Receiver.
1275 __ lw(T1, FieldAddress(T0, state_field.Offset())); // Field '_state'. 1275 __ lw(T1, FieldAddress(T0, state_field.Offset())); // Field '_state'.
1276 1276
1277 // Addresses of _state[0] and _state[1]. 1277 // Addresses of _state[0] and _state[1].
1278 const Address& addr_0 = FieldAddress(T1, 1278 const intptr_t scale = Instance::ElementSizeFor(kTypedDataUint32ArrayCid);
1279 FlowGraphCompiler::DataOffsetFor(kTypedDataUint32ArrayCid)); 1279 const intptr_t offset = Instance::DataOffsetFor(kTypedDataUint32ArrayCid);
1280 1280 const Address& addr_0 = FieldAddress(T1, 0 * scale + offset);
1281 const Address& addr_1 = FieldAddress(T1, 1281 const Address& addr_1 = FieldAddress(T1, 1 * scale + offset);
1282 FlowGraphCompiler::ElementSizeFor(kTypedDataUint32ArrayCid) +
1283 FlowGraphCompiler::DataOffsetFor(kTypedDataUint32ArrayCid));
1284 1282
1285 __ LoadImmediate(T0, a_int32_value); 1283 __ LoadImmediate(T0, a_int32_value);
1286 __ lw(T2, addr_0); 1284 __ lw(T2, addr_0);
1287 __ lw(T3, addr_1); 1285 __ lw(T3, addr_1);
1288 __ mtlo(T3); 1286 __ mtlo(T3);
1289 __ mthi(ZR); // HI:LO <- ZR:T3 Zero extend T3 into HI. 1287 __ mthi(ZR); // HI:LO <- ZR:T3 Zero extend T3 into HI.
1290 // 64-bit multiply and accumulate into T6:T3. 1288 // 64-bit multiply and accumulate into T6:T3.
1291 __ maddu(T0, T2); // HI:LO <- HI:LO + T0 * T2. 1289 __ maddu(T0, T2); // HI:LO <- HI:LO + T0 * T2.
1292 __ mflo(T3); 1290 __ mflo(T3);
1293 __ mfhi(T6); 1291 __ mfhi(T6);
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1701 Isolate* isolate = Isolate::Current(); 1699 Isolate* isolate = Isolate::Current();
1702 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); 1700 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate));
1703 // Set return value. 1701 // Set return value.
1704 __ Ret(); 1702 __ Ret();
1705 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); 1703 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset()));
1706 } 1704 }
1707 1705
1708 } // namespace dart 1706 } // namespace dart
1709 1707
1710 #endif // defined TARGET_ARCH_MIPS 1708 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698