svn commit: r379321 - head/devel/armv6-freebsd10.0-xdev/files
Dimitry Andric
dim at FreeBSD.org
Wed Feb 18 22:26:46 UTC 2015
Author: dim (src committer)
Date: Wed Feb 18 22:26:45 2015
New Revision: 379321
URL: https://svnweb.freebsd.org/changeset/ports/379321
QAT: https://qat.redports.org/buildarchive/r379321/
Log:
Fix undefined behavior in gas/contrib/tc-arm.c's rotate_left() macro, as
in https://svnweb.freebsd.org/base?view=revision&revision=274856
This fixes possible "invalid constant after fixup" errors from gas, when
it has been compiled with high levels of optimization.
PR: 197810
Approved by: maintainer (bapt)
Added:
head/devel/armv6-freebsd10.0-xdev/files/patch-contrib_binutils_gas_config_tc-arm.c (contents, props changed)
Added: head/devel/armv6-freebsd10.0-xdev/files/patch-contrib_binutils_gas_config_tc-arm.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/armv6-freebsd10.0-xdev/files/patch-contrib_binutils_gas_config_tc-arm.c Wed Feb 18 22:26:45 2015 (r379321)
@@ -0,0 +1,11 @@
+--- ./contrib/binutils/gas/config/tc-arm.c.orig 2014-01-16 21:40:13.000000000 +0100
++++ ./contrib/binutils/gas/config/tc-arm.c 2015-02-18 21:57:22.653597000 +0100
+@@ -6060,7 +6060,7 @@
+
+ /* 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. */
More information about the svn-ports-all
mailing list