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

Unified Diff: runtime/vm/intrinsifier_ia32.cc

Issue 638983002: Implement bigint mulAdd and sqrAdd intrinsics on ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_ia32.cc
===================================================================
--- runtime/vm/intrinsifier_ia32.cc (revision 40992)
+++ runtime/vm/intrinsifier_ia32.cc (working copy)
@@ -1036,7 +1036,7 @@
// Uint32List m_digits, int i,
// Uint32List a_digits, int j, int n) {
// uint32_t x = x_digits[xi >> 1]; // xi is Smi.
- // if (x == 0 || n == 0) {
+ // if (x == 0 || n == 0) {
// return;
// }
// uint32_t* mip = &m_digits[i >> 1]; // i is Smi.
@@ -1178,7 +1178,7 @@
// }
// EDI = xip = &x_digits[i >> 1]
- __ movl(EDI, Address(ESP, 4 * kWordSize)); // m_digits
+ __ movl(EDI, Address(ESP, 4 * kWordSize)); // x_digits
__ movl(EAX, Address(ESP, 3 * kWordSize)); // i is Smi
__ leal(EDI, FieldAddress(EDI, EAX, TIMES_2, TypedData::data_offset()));
@@ -1207,7 +1207,7 @@
__ movl(Address(ESI, 0), EAX);
__ addl(ESI, Immediate(kWordSize));
- // int n = used - i - 1; // All Smi.
+ // int n = used - i - 1
__ movl(EAX, Address(ESP, 2 * kWordSize)); // used is Smi
__ subl(EAX, Address(ESP, 4 * kWordSize)); // i is Smi
__ SmiUntag(EAX);
@@ -1263,22 +1263,17 @@
__ jmp(&loop, Assembler::kNearJump);
__ Bind(&done);
- // uint32_t aj = *ajp;
- __ movl(EAX, Address(ESI, 0));
-
- // uint64_t t = aj + c; // 32-bit + 33-bit -> 34-bit.
+ // uint64_t t = aj + c
__ movl(EAX, cl_addr); // t = c
__ movl(EDX, ch_addr);
- __ addl(EAX, Address(ESI, 0)); // t += aj
+ __ addl(EAX, Address(ESI, 0)); // t += *ajp
__ adcl(EDX, Immediate(0));
- // *ajp++ = low32(t);
+ // *ajp++ = low32(t)
+ // *ajp = high32(t)
__ movl(Address(ESI, 0), EAX);
- __ addl(ESI, Immediate(kWordSize));
+ __ movl(Address(ESI, kWordSize), EDX);
- // *ajp = high32(t);
- __ movl(Address(ESI, 0), EDX);
-
// Restore CTX and return.
__ Drop(3);
__ popl(CTX);
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698