<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I do not see that behavior on Darwin with either the old assembler or the integrated assembler:<div><div>enkidu: ~/tmp $ cat t.s<br>.align 0</div></div><div>enkidu: ~/tmp $ as t.s<br>enkidu: ~/tmp $ clang -c t.s<br></div><div><br></div><div>Yeah, it looks like a combination of target and platform logic determines how the value is interpreted. It’s x86 ELF that’s the outlier here, expecting a value in number of bytes.</div><div><br></div><div>There is no mention of the special case for zero in <a href="https://sourceware.org/binutils/docs/as/Align.html#Align">https://sourceware.org/binutils/docs/as/Align.html#Align</a>. From that, I would argue that the diagnostic is correct and the test cases are in error. If gas actually does default to ‘2’ for a specified value of zero, that seems really terrible and an error not to be repeated.</div><div><br></div><div>-Jim</div><div><br></div><div><div><div>On Oct 29, 2013, at 6:05 AM, Sid Manning <<a href="mailto:sidneym@codeaurora.org">sidneym@codeaurora.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br>".align 0" triggers the following error:<br><br>a.s:2:8: error: alignment must be a power of 2<br>.align 0<br>       ^<br>In this case would it be reasonable to query the target for a default<br>or minimum value?  Only targets not implementing this would error out.<br><br>Thanks,<br><br>On 10/28/2013 03:00 PM, Jim Grosbach wrote:<br><blockquote type="cite">Apple’s assembler does use power-of-two for .align. I believe binutils<br>does as well. I suspect the header file comment is in error and what’s<br>actually happening is that the section in question has a minimum<br>alignment on the system(s) in question, and so it just looks like it’s<br>redundant. That is, I doubt we need to do anything here.<br><br>-Jim<br><br>On Oct 28, 2013, at 11:54 AM, Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a><br><<a href="mailto:renato.golin@linaro.org">mailto:renato.golin@linaro.org</a>>> wrote:<br><br><blockquote type="cite">Hi Sid,<br><br>It seems Apple's assembler used to treat .align 0 differently:<br><br><a href="https://developer.apple.com/library/mac/documentation/developertools/Reference/Assembler/040-Assembler_Directives/asm_directives.html">https://developer.apple.com/library/mac/documentation/developertools/Reference/Assembler/040-Assembler_Directives/asm_directives.html</a><br><br>If this is still the case, than we should have an option for what to<br>do in this case, maybe defaulting based on the triple?<br><br>cheers,<br>--renato<br><br><br>On 28 October 2013 17:53, Sid Manning <sidneym@codeaurora.org<br><mailto:sidneym@codeaurora.org>> wrote:<br><br><br>    I have several assembly files in a testsuite that use, ".align 0".<br>    I found a reference to, ".align 0" in ARM's elf.h that says .align<br>    0 is redundant and gas treats this as align 2.<br><br>    Should the llvm-mc follow this convention?<br><br>    --<br>    Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,<br>    hosted by The Linux Foundation<br>    _________________________________________________<br>    LLVM Developers mailing list<br>    LLVMdev@cs.uiuc.edu <mailto:LLVMdev@cs.uiuc.edu><br>    http://llvm.cs.uiuc.edu <http://llvm.cs.uiuc.edu/><br>    http://lists.cs.uiuc.edu/__mailman/listinfo/llvmdev<br>    <http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev><br><br><br>_______________________________________________<br>LLVM Developers mailing list<br>LLVMdev@cs.uiuc.edu <mailto:LLVMdev@cs.uiuc.edu> http://llvm.cs.uiuc.edu<br>http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev<br></blockquote><br></blockquote><br><br>-- <br>Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation<br></blockquote></div><br></div></body></html>