diff options
author | Doug Kwan <dougkwan@google.com> | 2009-06-04 01:31:01 +0000 |
---|---|---|
committer | Doug Kwan <dougkwan@google.com> | 2009-06-04 01:31:01 +0000 |
commit | 96d493066dbfe6581b2647c36c351fac201da48b (patch) | |
tree | 93c60a21df733a915e821d669e56c5f767d86a7c /gold/arm.cc | |
parent | 930123b7a10ca605d1aae217a4224736cceed337 (diff) | |
download | gdb-96d493066dbfe6581b2647c36c351fac201da48b.zip gdb-96d493066dbfe6581b2647c36c351fac201da48b.tar.gz gdb-96d493066dbfe6581b2647c36c351fac201da48b.tar.bz2 |
2009-06-03 Doug Kwan <dougkwan@google.com>
* arm.cc (utils::sign_extend): Reverse test in gold_assert.
(utils::has_overflow): Same.
Diffstat (limited to 'gold/arm.cc')
-rw-r--r-- | gold/arm.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gold/arm.cc b/gold/arm.cc index 5165a52..76538de 100644 --- a/gold/arm.cc +++ b/gold/arm.cc @@ -97,7 +97,7 @@ namespace utils static inline int32_t sign_extend(uint32_t bits) { - gold_assert(no_bits < 1 || no_bits > 32); + gold_assert(no_bits >= 0 && no_bits <= 32); if (no_bits == 32) return static_cast<int32_t>(bits); uint32_t mask = (~((uint32_t) 0)) >> (32 - no_bits); @@ -112,7 +112,7 @@ namespace utils static inline bool has_overflow(uint32_t bits) { - gold_assert(no_bits < 1 || no_bits > 32); + gold_assert(no_bits >= 0 && no_bits <= 32); if (no_bits == 32) return false; int32_t max = (1 << (no_bits - 1)) - 1; |