diff options
author | Alexey Neyman <stilor@att.net> | 2017-07-13 07:38:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-13 07:38:03 (GMT) |
commit | 45c5bb0f484cba724be2c6105801dcce9a1a82d9 (patch) | |
tree | 8fd1c8eaa2ef203009d72b6ca6348611dcc5ee1c /packages/binutils/2.25.1/400-arm-rotate_left-fix.patch | |
parent | 8f8e131d566af1f577d8fb6e62e6f121b7955472 (diff) | |
parent | b32fcf7c1eea890a2bd3f88487f818ba241aabb1 (diff) |
Merge pull request #767 from stilor/packages
Packages
Diffstat (limited to 'packages/binutils/2.25.1/400-arm-rotate_left-fix.patch')
-rw-r--r-- | packages/binutils/2.25.1/400-arm-rotate_left-fix.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/packages/binutils/2.25.1/400-arm-rotate_left-fix.patch b/packages/binutils/2.25.1/400-arm-rotate_left-fix.patch new file mode 100644 index 0000000..4149597 --- /dev/null +++ b/packages/binutils/2.25.1/400-arm-rotate_left-fix.patch @@ -0,0 +1,26 @@ +From d840c081f8082e8b9e63fead5306643975a97bb3 Mon Sep 17 00:00:00 2001 +From: Richard Earnshaw <Richard.Earnshaw@arm.com> +Date: Thu, 20 Nov 2014 17:02:47 +0000 +Subject: [PATCH] * config/tc-arm.c (rotate_left): Avoid undefined behaviour + when N = 0. + +--- + gas/config/tc-arm.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletion(-) + +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. */ +-- +1.9.4 + |