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

Unified Diff: runtime/vm/intermediate_language_mips.cc

Issue 18053013: Fixes bug in mips left shift. (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 | « no previous file | tests/corelib/corelib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_mips.cc
===================================================================
--- runtime/vm/intermediate_language_mips.cc (revision 24556)
+++ runtime/vm/intermediate_language_mips.cc (working copy)
@@ -2260,8 +2260,7 @@
__ sltiu(CMPRES,
right, Immediate(reinterpret_cast<int32_t>(Smi::New(Smi::kBits))));
__ movz(result, ZR, CMPRES); // result = right >= kBits ? 0 : result.
- __ mov(TMP1, right);
- __ SmiUntag(TMP1);
+ __ sra(TMP1, right, kSmiTagSize);
__ sllv(TMP1, left, TMP1);
// result = right < kBits ? left << right : result.
__ movn(result, TMP1, CMPRES);
@@ -2284,7 +2283,7 @@
__ srav(temp, temp, TMP);
__ bne(temp, left, deopt); // Overflow.
// Shift for result now we know there is no overflow.
- __ sll(result, left, TMP);
+ __ sllv(result, left, TMP);
}
}
« no previous file with comments | « no previous file | tests/corelib/corelib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698