From owner-svn-src-stable@FreeBSD.ORG Fri Feb 22 18:35:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 38E5E29B; Fri, 22 Feb 2013 18:35:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 12DCB1AF; Fri, 22 Feb 2013 18:35:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1MIZeID068444; Fri, 22 Feb 2013 18:35:40 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1MIZeu9068443; Fri, 22 Feb 2013 18:35:40 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201302221835.r1MIZeu9068443@svn.freebsd.org> From: Dimitry Andric Date: Fri, 22 Feb 2013 18:35:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247157 - stable/9/contrib/llvm/lib/MC/MCParser X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2013 18:35:41 -0000 Author: dim Date: Fri Feb 22 18:35:40 2013 New Revision: 247157 URL: http://svnweb.freebsd.org/changeset/base/247157 Log: MFC r247003: Pull in r175360 from upstream llvm trunk: MCParser: Reject .balign with non-pow2 alignments. GNU as rejects them and there are configure scripts in the wild that check if the assembler rejects ".align 3" to determine whether the alignment is in bytes or powers of two. Modified: stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Fri Feb 22 18:33:42 2013 (r247156) +++ stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Fri Feb 22 18:35:40 2013 (r247157) @@ -2372,6 +2372,10 @@ bool AsmParser::ParseDirectiveAlign(bool } Alignment = 1ULL << Alignment; + } else { + // Reject alignments that aren't a power of two, for gas compatibility. + if (!isPowerOf2_64(Alignment)) + Error(AlignmentLoc, "alignment must be a power of 2"); } // Diagnose non-sensical max bytes to align.