[llvm-commits] [llvm] r163405 - /llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp

Benjamin Kramer benny.kra at gmail.com
Fri Sep 7 13:19:21 PDT 2012


On 07.09.2012, at 22:02, Chandler Carruth <chandlerc at google.com> wrote:

> On Fri, Sep 7, 2012 at 2:56 PM, Benjamin Kramer <benny.kra at googlemail.com> wrote:
> Author: d0k
> Date: Fri Sep  7 13:56:10 2012
> New Revision: 163405
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=163405&view=rev
> Log:
> Contrary to what the documentation says, .lcomm alignment on COFF is in bytes, not power of 2.
> 
> Test case?

This fixed a couple of test failures on the mingw32 bot, I tried to get a test case with coff-dump working but it didn't show me the info I needed :(

> Also, if this is contrary to documentation, can we fix the documentation? Can we at least add comments here to explain why we are diverging from documented behavior? ;]

I'm still not entirely sure if this is doing the right thing on mingw in all cases, the historic differences in gas between platforms are subtle and really annoying. The gas docs seem to talk about .comm alignment for PE, which is weird because my copy of mingw gas doesn't even support alignment on .comm. The docs for .lcomm don't specifies how alignment is handled.

- Ben
>  
> 
> Modified:
>     llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp
> 
> Modified: llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp?rev=163405&r1=163404&r2=163405&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp (original)
> +++ llvm/trunk/lib/MC/MCAsmInfoCOFF.cpp Fri Sep  7 13:56:10 2012
> @@ -19,7 +19,7 @@
> 
>  MCAsmInfoCOFF::MCAsmInfoCOFF() {
>    GlobalPrefix = "_";
> -  COMMDirectiveAlignmentIsInBytes = false;
> +  COMMDirectiveAlignmentIsInBytes = true;
>    LCOMMDirectiveSupportsAlignment = true;
>    HasDotTypeDotSizeDirective = false;
>    HasSingleParameterDotFile = false;
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 





More information about the llvm-commits mailing list