Commit: MSP430: GAS: Correct range check of imm20 operands
Jeff Law
jeffreyalaw@gmail.com
Sat Mar 8 14:56:02 GMT 2025
On 3/7/25 3:38 AM, Nick Clifton wrote:
> Hi Guys,
>
> I am applying the attached patch to fix the msp430 assembler's
> checking of 20-bit immediate values. The code used to check
> for negative values less than -(0x7ffff) but this is incorrect
> as it does not allow -524289.
>
> Whilst correcting this, and adding a few extra lines to the MSP430
> testsuite to make sure that the checks work correctly I realised
> that it might not be obvious why positive values up to 0xfffff are
> allowed for a signed immediate field. So I have added in a couple
> of comments explaining about the special native of hex constants
> in immediate fields.
Thanks for taking care of this. FWIW, it looks like it fixed ~50
pre-existing failures in the GCC testsuite.
There's a few new failures, but I'm far from convinced they're due to
this change. One of them has been a relatively flakey test. The other
two are execution tests which I would expect to be unaffected by this
change.
Anyway, I own fixing the GCC issues we discussed, but wanted to say
thanks for owning the binutils side.
jeff
More information about the Binutils
mailing list