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

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

Issue 18054006: Fix Random_nextState intrinsic on ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/disassembler_arm.cc ('k') | runtime/vm/simulator_arm.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_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 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 const int64_t disp_0 = 1395 const int64_t disp_0 =
1396 FlowGraphCompiler::DataOffsetFor(kTypedDataUint32ArrayCid); 1396 FlowGraphCompiler::DataOffsetFor(kTypedDataUint32ArrayCid);
1397 1397
1398 const int64_t disp_1 = 1398 const int64_t disp_1 =
1399 FlowGraphCompiler::ElementSizeFor(kTypedDataUint32ArrayCid) + 1399 FlowGraphCompiler::ElementSizeFor(kTypedDataUint32ArrayCid) +
1400 FlowGraphCompiler::DataOffsetFor(kTypedDataUint32ArrayCid); 1400 FlowGraphCompiler::DataOffsetFor(kTypedDataUint32ArrayCid);
1401 1401
1402 __ LoadImmediate(R0, a_int32_value); 1402 __ LoadImmediate(R0, a_int32_value);
1403 __ LoadFromOffset(kLoadWord, R2, R1, disp_0 - kHeapObjectTag); 1403 __ LoadFromOffset(kLoadWord, R2, R1, disp_0 - kHeapObjectTag);
1404 __ LoadFromOffset(kLoadWord, R3, R1, disp_1 - kHeapObjectTag); 1404 __ LoadFromOffset(kLoadWord, R3, R1, disp_1 - kHeapObjectTag);
1405 __ mov(R6, ShifterOperand(R3, ASR, 31)); // Sign extend into R6. 1405 __ mov(R6, ShifterOperand(0)); // Zero extend unsigned _state[kSTATE_HI].
1406 // 64-bit multiply and accumulate into R6:R3. 1406 // Unsigned 32-bit multiply and 64-bit accumulate into R6:R3.
1407 __ smlal(R3, R6, R0, R2); // R6:R3 <- R6:R3 + R0 * R2. 1407 __ umlal(R3, R6, R0, R2); // R6:R3 <- R6:R3 + R0 * R2.
1408 __ StoreToOffset(kStoreWord, R3, R1, disp_0 - kHeapObjectTag); 1408 __ StoreToOffset(kStoreWord, R3, R1, disp_0 - kHeapObjectTag);
1409 __ StoreToOffset(kStoreWord, R6, R1, disp_1 - kHeapObjectTag); 1409 __ StoreToOffset(kStoreWord, R6, R1, disp_1 - kHeapObjectTag);
1410 __ Ret(); 1410 __ Ret();
1411 return true; 1411 return true;
1412 } 1412 }
1413 1413
1414 1414
1415 bool Intrinsifier::Object_equal(Assembler* assembler) { 1415 bool Intrinsifier::Object_equal(Assembler* assembler) {
1416 __ ldr(R0, Address(SP, 0 * kWordSize)); 1416 __ ldr(R0, Address(SP, 0 * kWordSize));
1417 __ ldr(R1, Address(SP, 1 * kWordSize)); 1417 __ ldr(R1, Address(SP, 1 * kWordSize));
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 __ Bind(&ok); 1697 __ Bind(&ok);
1698 __ Ret(); 1698 __ Ret();
1699 1699
1700 __ Bind(&fall_through); 1700 __ Bind(&fall_through);
1701 return false; 1701 return false;
1702 } 1702 }
1703 1703
1704 } // namespace dart 1704 } // namespace dart
1705 1705
1706 #endif // defined TARGET_ARCH_ARM 1706 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/disassembler_arm.cc ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698