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

Unified Diff: runtime/vm/simulator_arm.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
« runtime/vm/intrinsifier_arm.cc ('K') | « runtime/vm/intrinsifier_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_arm.cc
===================================================================
--- runtime/vm/simulator_arm.cc (revision 40991)
+++ runtime/vm/simulator_arm.cc (working copy)
@@ -1774,6 +1774,9 @@
}
break;
}
+ case 2:
+ // Registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs.
+ // Format(instr, "umaal'cond's 'rd, 'rn, 'rm, 'rs");
case 5:
// Registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs.
// Format(instr, "umlal'cond's 'rd, 'rn, 'rm, 'rs");
@@ -1790,10 +1793,16 @@
uint64_t left_op = static_cast<uint32_t>(rm_val);
uint64_t right_op = static_cast<uint32_t>(rs_val);
result = accum + left_op * right_op; // Unsigned nultiplication.
zra 2014/10/08 15:54:46 multiplication
regis 2014/10/08 16:58:00 Done.
- } else { // smlal
+ } else if (instr->Bits(21, 3) == 7) { // smlal
int64_t left_op = static_cast<int32_t>(rm_val);
int64_t right_op = static_cast<int32_t>(rs_val);
result = accum + left_op * right_op; // Signed nultiplication.
zra 2014/10/08 15:54:46 multiplication
regis 2014/10/08 16:58:00 Done.
+ } else {
Cutch 2014/10/08 15:22:26 ASSERT(instr->Bits(21, 3) == 2);
regis 2014/10/08 16:58:00 Done.
+ uint64_t left_op = static_cast<uint32_t>(rm_val);
+ uint64_t right_op = static_cast<uint32_t>(rs_val);
+ result = left_op * right_op + // Unsigned nultiplication.
zra 2014/10/08 15:54:46 multiplication
regis 2014/10/08 16:58:00 Done.
+ static_cast<uint32_t>(rd_lo_val) +
+ static_cast<uint32_t>(rd_hi_val);
}
int32_t hi_res = Utils::High32Bits(result);
int32_t lo_res = Utils::Low32Bits(result);
« runtime/vm/intrinsifier_arm.cc ('K') | « runtime/vm/intrinsifier_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698