From: Nick Clifton Date: Mon, 3 Nov 2014 11:17:45 +0000 (+0000) Subject: Fixes a snafu checking the size of a 20-bit immediate. X-Git-Tag: binutils-2_25~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=015b14ca278a500f59848d2dcc1e3b4604c22030;p=thirdparty%2Fbinutils-gdb.git Fixes a snafu checking the size of a 20-bit immediate. * config/tc-msp430.c (msp430_srcoperand): Fix range test for 20-bit values. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index e8067cce8df..fde4a5251e7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,8 +1,14 @@ +2014-11-03 Nick Clifton + + Apply trunk patch: + 2014-11-03 Nick Clifton + * config/tc-msp430.c (msp430_srcoperand): Fix range test for + 20-bit values. + 2014-10-30 Nick Clifton Apply trunk patches 2014-10-30 Dr Philipp Tomsich - * 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 diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c index 1398b8c2acd..25ec0ee45b7 100644 --- a/gas/config/tc-msp430.c +++ b/gas/config/tc-msp430.c @@ -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;