Skip to content

Commit

Permalink
Fix off by 1 for branch profiles > 2^31
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Rogers committed Jun 3, 2009
1 parent 5f385e8 commit 637b1c2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ abstract static class BranchProfile {
static float countToFloat(int count) {
if (count < 0) {
final float MAX_UNSIGNED_INT = 2147483648f;
return MAX_UNSIGNED_INT + (float)Math.abs(count);
return MAX_UNSIGNED_INT + (float)(count & 0x7FFFFFFF);
} else {
return (float)count;
}
Expand Down

0 comments on commit 637b1c2

Please sign in to comment.