]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fixes a snafu checking the size of a 20-bit immediate.
authorNick Clifton <nickc@redhat.com>
Mon, 3 Nov 2014 11:17:45 +0000 (11:17 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 3 Nov 2014 11:17:45 +0000 (11:17 +0000)
* config/tc-msp430.c (msp430_srcoperand): Fix range test for
20-bit values.

gas/ChangeLog
gas/config/tc-msp430.c

index e8067cce8df224cb6249c7ebc6bc21a52f82f481..fde4a5251e7f296864afb0c66fe93e2ceb7f0282 100644 (file)
@@ -1,8 +1,14 @@
+2014-11-03  Nick Clifton  <nickc@redhat.com>
+
+       Apply trunk patch:
+       2014-11-03  Nick Clifton  <nickc@redhat.com>
+       * config/tc-msp430.c (msp430_srcoperand): Fix range test for
+       20-bit values.
+
 2014-10-30  Nick Clifton  <nickc@redhat.com>
 
        Apply trunk patches
        2014-10-30  Dr Philipp Tomsich  <philipp.tomsich@theobroma-systems.com>
-
        * config/tc-aarch64.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define to 7.
        * config/tc-aarch64.c (aarch64_handle_align): Rewrite to handle
        large alignments with a constant fragment size of
index 1398b8c2acddd3af2d9ab61234034eac276b0692..25ec0ee45b75a2cdcc7c5655551130c07bbe5bcd 100644 (file)
@@ -1132,7 +1132,7 @@ msp430_srcoperand (struct msp430_operand_s * op,
 
          if (allow_20bit_values)
            {
-             if (op->exp.X_add_number > 0xfffff || op->exp.X_add_number < - (0x7ffff))
+             if (op->exp.X_add_number > 0xfffff || op->exp.X_add_number < -524288)
                {
                  as_bad (_("value 0x%x out of extended range."), x);
                  return 1;