mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-27 22:10:32 +00:00
2009-06-03 Doug Kwan <dougkwan@google.com>
* arm.cc (utils::sign_extend): Reverse test in gold_assert. (utils::has_overflow): Same.
This commit is contained in:
parent
930123b7a1
commit
96d493066d
@ -1,3 +1,8 @@
|
||||
2009-06-03 Doug Kwan <dougkwan@google.com>
|
||||
|
||||
* arm.cc (utils::sign_extend): Reverse test in gold_assert.
|
||||
(utils::has_overflow): Same.
|
||||
|
||||
2009-06-03 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* layout.cc (Layout::section_name_mapping): New array, replacing
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user