diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 5077f87..9100fb2 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -7251,7 +7251,7 @@ parse_operands (char *str, const unsigned int *pattern, bfd_boolean thumb) /* Functions for operand encoding. ARM, then Thumb. */ -#define rotate_left(v, n) (v << n | v >> (32 - n)) +#define rotate_left(v, n) (v << (n & 31) | v >> ((32 - n) & 31)) /* If VAL can be encoded in the immediate field of an ARM instruction, return the encoded form. Otherwise, return FAIL. */