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

Unified Diff: runtime/vm/simulator_mips.cc

Issue 18141002: Fixes a bug in the mips Random_nextState intrinsic. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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_mips.cc ('k') | tests/lib/lib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_mips.cc
===================================================================
--- runtime/vm/simulator_mips.cc (revision 24548)
+++ runtime/vm/simulator_mips.cc (working copy)
@@ -1394,8 +1394,8 @@
uint32_t lo = get_lo_register();
int32_t hi = get_hi_register();
int64_t accum = Utils::LowHighTo64Bits(lo, hi);
- int64_t rs = static_cast<int64_t>(get_register(instr->RsField()));
- int64_t rt = static_cast<int64_t>(get_register(instr->RtField()));
+ int64_t rs = get_register(instr->RsField());
+ int64_t rt = get_register(instr->RtField());
int64_t res = accum + rs * rt;
set_hi_register(Utils::High32Bits(res));
set_lo_register(Utils::Low32Bits(res));
@@ -1408,8 +1408,8 @@
uint32_t lo = get_lo_register();
uint32_t hi = get_hi_register();
uint64_t accum = Utils::LowHighTo64Bits(lo, hi);
- uint64_t rs = static_cast<uint64_t>(get_register(instr->RsField()));
- uint64_t rt = static_cast<uint64_t>(get_register(instr->RtField()));
+ uint64_t rs = static_cast<uint32_t>(get_register(instr->RsField()));
+ uint64_t rt = static_cast<uint32_t>(get_register(instr->RtField()));
uint64_t res = accum + rs * rt;
set_hi_register(Utils::High32Bits(res));
set_lo_register(Utils::Low32Bits(res));
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698