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

Unified Diff: runtime/vm/bit_set.h

Issue 559883002: Fix ARM: explicitly reduce shift count modulo word size. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/bit_set.h
===================================================================
--- runtime/vm/bit_set.h (revision 40079)
+++ runtime/vm/bit_set.h (working copy)
@@ -41,7 +41,7 @@
ASSERT(i >= 0);
ASSERT(i < N);
intptr_t w = i >> kBitsPerWordLog2;
- uword mask = ~static_cast<uword>(0) << i;
+ uword mask = ~static_cast<uword>(0) << (i & (kBitsPerWord - 1));
if ((data_[w] & mask) != 0) {
uword tz = Utils::CountTrailingZeros(data_[w] & mask);
return (w << kBitsPerWordLog2) + tz;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698