From 99b4a5a08507a96f6d014553c9ac4c5e257f37a2 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 3 Nov 2014 11:15:53 +0000 Subject: Fixes a snafu checking the size of 20-bit immedaite values. * config/tc-msp430.c (msp430_srcoperand): Fix range test for 20-bit values. --- gas/ChangeLog | 5 +++++ gas/config/tc-msp430.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index a1a4224..18ceb94 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2014-11-03 Nick Clifton + + * config/tc-msp430.c (msp430_srcoperand): Fix range test for + 20-bit values. + 2014-10-31 Andrew Pinski Naveen H.S diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c index 1398b8c..25ec0ee 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; -- cgit v1.1