artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
034571e
)
Avoid undefined behaviour in rorate_left() macro. From NetBSD via FreeBSD.
author
kettenis
<kettenis@openbsd.org>
Tue, 12 Dec 2017 10:06:45 +0000
(10:06 +0000)
committer
kettenis
<kettenis@openbsd.org>
Tue, 12 Dec 2017 10:06:45 +0000
(10:06 +0000)
Makes gas work when compiled with clang.
ok patrick@, millert@
gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c
patch
|
blob
|
history
diff --git
a/gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c
b/gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c
index
da965a0
..
e00afa2
100644
(file)
--- a/
gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c
+++ b/
gnu/usr.bin/binutils-2.17/gas/config/tc-arm.c
@@
-4266,7
+4266,7
@@
parse_operands (char *str, const unsigned char *pattern)
/* Functions for operand encoding. ARM, then Thumb. */
-#define rotate_left(v, n) (v <<
n | v >> (32 - n
))
+#define rotate_left(v, n) (v <<
(n % 32) | v >> ((32 - n) % 32
))
/* If VAL can be encoded in the immediate field of an ARM instruction,
return the encoded form. Otherwise, return FAIL. */