From owner-svn-src-all@FreeBSD.ORG Tue Feb 19 17:53:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 31E1487B; Tue, 19 Feb 2013 17:53:33 +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 1A1AB997; Tue, 19 Feb 2013 17:53:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1JHrWbh028790; Tue, 19 Feb 2013 17:53:32 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1JHrWnm028789; Tue, 19 Feb 2013 17:53:32 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201302191753.r1JHrWnm028789@svn.freebsd.org> From: Dimitry Andric Date: Tue, 19 Feb 2013 17:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r247003 - head/contrib/llvm/lib/MC/MCParser X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2013 17:53:33 -0000 Author: dim Date: Tue Feb 19 17:53:32 2013 New Revision: 247003 URL: http://svnweb.freebsd.org/changeset/base/247003 Log: 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. MFC after: 3 days Modified: head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Modified: head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Tue Feb 19 17:38:18 2013 (r247002) +++ head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Tue Feb 19 17:53:32 2013 (r247003) @@ -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.