[llvm-commits] [llvm] r129432 - in /llvm/trunk: lib/Target/TargetData.cpp test/CodeGen/ARM/2011-04-12-AlignBug.ll

Cameron Zwarich zwarich at apple.com
Wed Apr 13 06:49:56 PDT 2011

On 2011-04-13, at 3:51 AM, Renato Golin wrote:

> On 13 April 2011 10:39, Cameron Zwarich <zwarich at apple.com> wrote:
>>> shouldn't alignment be a power of 2?
>> The align assembler directive on ARM uses the number of leading 0 bits of the address, not the byte alignment.
> AFAIK .align is an alias to .balign and it should indeed be a power of
> 2, as it is the byte alignment of the data to follow.

I have no idea about the history here, but LLVM is definitely using leading zeros in this test and all of the other ARM alignment tests, which is probably based on what the GNU assembler does:


Presumedly the GNU assembler is basing its behaviour on what some earlier popular ARM assembler did.


More information about the llvm-commits mailing list