Fix range check for immediate operand.
authorNick Clifton <nickc@redhat.com>
Wed, 31 Jul 2002 09:17:52 +0000 (09:17 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 31 Jul 2002 09:17:52 +0000 (09:17 +0000)
gas/ChangeLog
gas/config/tc-v850.c

index 4a4fad50e0305e488d64a2740cb198be86024f36..094b036be96dfebe1f03b2d3602cbfedd22221e8 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-31  Momchil Velikov  <velco@fadata.bg>
+
+       * config/tc-v850.c (md_assemble): Fix range check for immediate
+       operand.
+
 2002-07-30  Chris Demetriou  <cgd@broadcom.com>
 
        * config/tc-mips.c (mips_cpu_info_table): Clean up entries related
index 11abc665413d8fd4a489263ce959ea60a71b5905..eaadaafb20992decf5697ab4b06752280d971eaf 100644 (file)
@@ -1961,7 +1961,7 @@ md_assemble (str)
                  if (((insn & 0x07e0) == 0x0200)
                      && ex.X_op == O_constant
                      && (ex.X_add_number < (-(1 << (operand->bits - 1)))
-                         || ex.X_add_number > ((1 << operand->bits) - 1)))
+                         || ex.X_add_number > ((1 << (operand->bits - 1)) - 1)))
                    errmsg = _("immediate operand is too large");
                }