* config/tc-arm.c (rotate_left): Avoid undefined behaviour when N = 0.
This commit is contained in:
parent
c22ee0ad9d
commit
d840c081f8
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2014-11-20 Richard Earnshaw <rearnsha@arm.com>
|
||||
|
||||
* config/tc-arm.c (rotate_left): Avoid undefined behaviour when
|
||||
N = 0.
|
||||
|
||||
2014-11-20 Richard Earnshaw <rearnsha@arm.com>
|
||||
|
||||
* config/tc-aarch64.c (warn_unpredictable_ldst): Check that transfer
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in a new issue