diff options
author | David Brazdil <dbrazdil@google.com> | 2015-03-26 15:11:45 +0000 |
---|---|---|
committer | David Brazdil <dbrazdil@google.com> | 2015-03-26 15:11:45 +0000 |
commit | 74fc513982fa74b1120f7b8546fc825fc406e1b1 (patch) | |
tree | bb6d78e147eb0eb6f4134c2ee1c7aa24b51f7644 /runtime/utils.h | |
parent | 5eae0b6112aef6b1bc3a24427e80f1ef96e513dc (diff) | |
download | art-74fc513982fa74b1120f7b8546fc825fc406e1b1.tar.gz art-74fc513982fa74b1120f7b8546fc825fc406e1b1.tar.bz2 art-74fc513982fa74b1120f7b8546fc825fc406e1b1.zip |
ART: Define IsInt when N==kBitsPerIntPtrT
'utils.h' contains two implementations of the IsInt query, one of
which is defined for bit sizes <= kBitsPerIntPtrT, while the other
only for sizes < kBitsPerIntPtrT. This patch unifies the behaviour
and fixes the breakage caused by it.
Change-Id: I4f5589b1a36b6c24926e50574fbca528c33d701f
Diffstat (limited to 'runtime/utils.h')
-rw-r--r-- | runtime/utils.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/utils.h b/runtime/utils.h index e20412e1ab..1a7fdfb4dc 100644 --- a/runtime/utils.h +++ b/runtime/utils.h @@ -110,6 +110,7 @@ static inline bool IsAlignedParam(T x, int n) { // Check whether an N-bit two's-complement representation can hold value. static inline bool IsInt(int N, intptr_t value) { + if (N == kBitsPerIntPtrT) return true; CHECK_LT(0, N); CHECK_LT(N, kBitsPerIntPtrT); intptr_t limit = static_cast<intptr_t>(1) << (N - 1); |