2009-06-03 Doug Kwan <dougkwan@google.com>
authorDoug Kwan <dougkwan@google.com>
Thu, 4 Jun 2009 01:31:01 +0000 (01:31 +0000)
committerDoug Kwan <dougkwan@google.com>
Thu, 4 Jun 2009 01:31:01 +0000 (01:31 +0000)
* arm.cc (utils::sign_extend): Reverse test in gold_assert.
(utils::has_overflow): Same.

gold/ChangeLog
gold/arm.cc

index 7408ac61a62ae3964f64d8bd952fb310168a7273..8f42e6ae7bc39b1654b511862aa307cc77ed1110 100644 (file)
@@ -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
index 5165a5220d5706e433f489198c64bd5f548636b8..76538de789dbe7498a7debab3d3992d2d8432379 100644 (file)
@@ -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;
This page took 0.032256 seconds and 4 git commands to generate.