Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Feb 2013 17:53:32 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
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
Message-ID:  <201302191753.r1JHrWnm028789@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302191753.r1JHrWnm028789>