<div dir="ltr">Apologies for forgetting that fact.  I'll change to .p2align 5 if there are no objections.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 5, 2013 at 9:56 AM, Benjamin Kramer <span dir="ltr"><<a href="mailto:benny.kra@gmail.com" target="_blank">benny.kra@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 05.03.2013, at 18:49, Chad Rosier <<a href="mailto:mcrosier@apple.com">mcrosier@apple.com</a>> wrote:<br>
<br>
> David,<br>
> This is failing for me locally with the following error:<br>
><br>
> /Users/mcrosier/llvm-clean/llvm/test/MC/X86/x86_long_nop.s:6:8: error: invalid alignment value<br>
> .align 32<br>
><br>
> Does the .align directive expect log base 2 of the byte alignment (i.e., .align 5)?<br>
<br>
</div>Depends on the platform, it's log2 on darwin and byte alignment on most ELF platforms.<br>
<br>
.p2align and .balign are portable alternatives.<br>
<br>
- Ben<br>
<div class="HOEnZb"><div class="h5"><br>
>  Chad<br>
><br>
> On Mar 5, 2013, at 8:46 AM, David Sehr <<a href="mailto:sehr@google.com">sehr@google.com</a>> wrote:<br>
><br>
>> Author: sehr<br>
>> Date: Tue Mar  5 10:46:54 2013<br>
>> New Revision: 176490<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=176490&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=176490&view=rev</a><br>
>> Log:<br>
>> Add a test that .align directives on capable processors use long NOPs.<br>
>><br>
>> Added:<br>
>>    llvm/trunk/test/MC/X86/x86_long_nop.s<br>
>><br>
>> Added: llvm/trunk/test/MC/X86/x86_long_nop.s<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86_long_nop.s?rev=176490&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86_long_nop.s?rev=176490&view=auto</a><br>

>> ==============================================================================<br>
>> --- llvm/trunk/test/MC/X86/x86_long_nop.s (added)<br>
>> +++ llvm/trunk/test/MC/X86/x86_long_nop.s Tue Mar  5 10:46:54 2013<br>
>> @@ -0,0 +1,12 @@<br>
>> +# RUN: llvm-mc -filetype=obj -arch=x86 -mcpu=i686 %s | llvm-objdump -d -no-show-raw-insn - | FileCheck %s<br>
>> +<br>
>> +# Ensure alignment directives also emit sequences of 15-byte NOPs on processors<br>
>> +# capable of using long NOPs.<br>
>> +inc %eax<br>
>> +.align 32<br>
>> +inc %eax<br>
>> +# CHECK: 0:  inc<br>
>> +# CHECK-NEXT: 1:  nop<br>
>> +# CHECK-NEXT: 10:  nop<br>
>> +# CHECK-NEXT: 1f:  nop<br>
>> +# CHECK-NEXT: 20:  inc<br>
>><br>
>><br>
>> _______________________________________________<br>
>> llvm-commits mailing list<br>
>> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
</div></div></blockquote></div><br></div>