From owner-svn-ports-head@FreeBSD.ORG Wed Feb 18 22:23:08 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12759E16; Wed, 18 Feb 2015 22:23:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCFC7880; Wed, 18 Feb 2015 22:23:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1IMN7kr042781; Wed, 18 Feb 2015 22:23:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1IMN7wX042780; Wed, 18 Feb 2015 22:23:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502182223.t1IMN7wX042780@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 18 Feb 2015 22:23:07 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r379320 - head/devel/binutils/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2015 22:23:08 -0000 Author: dim (src committer) Date: Wed Feb 18 22:23:06 2015 New Revision: 379320 URL: https://svnweb.freebsd.org/changeset/ports/379320 QAT: https://qat.redports.org/buildarchive/r379320/ Log: Fix undefined behavior in gas/contrib/tc-arm.c's rotate_left() macro, similar to 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. Obtained from: binutils commit d840c081f8082e8b9e63fead5306643975a97bb3 PR: 197806 Approved by: maintainer (bapt) Added: head/devel/binutils/files/patch-gas_config_tc-arm.c (contents, props changed) Added: head/devel/binutils/files/patch-gas_config_tc-arm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/binutils/files/patch-gas_config_tc-arm.c Wed Feb 18 22:23:06 2015 (r379320) @@ -0,0 +1,17 @@ +From d840c081f8082e8b9e63fead5306643975a97bb3 Mon Sep 17 00:00:00 2001 +From: Richard Earnshaw +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.orig 2014-10-14 09:32:03.000000000 +0200 ++++ gas/config/tc-arm.c 2015-02-18 21:13:40.720573000 +0100 +@@ -7251,7 +7251,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 & 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. */