[PATCH] D35545: [AArch64, COFF] Interpret .align as power of two for COFF as well

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 12:26:39 PDT 2017


mstorsjo added inline comments.


================
Comment at: lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp:108
   PrivateLabelPrefix = ".L";
+  AlignmentIsInBytes = false;
 }
----------------
efriedma wrote:
> Is there any particular reason to choose one way or the other here?
In my case, it is to make it possible to assemble existing handwritten aarch64 gas assembly (that currently targets linux and darwin) for windows as well. For armv7, we already have the same situation where linux/darwin gas assembly also can be built for windows, but only while using the armv7-windows-gnu target, not the armv7-windows-msvc target.

If you'd prefer that, I could try to make that distinction here as well, and only match the gas behaviour in the -gnu variant.


================
Comment at: test/MC/AArch64/jump-table.s:2
 // RUN: llvm-mc < %s -triple=aarch64-none-linux-gnu -filetype=obj | llvm-readobj -r | FileCheck %s
+// RUN: llvm-mc < %s -triple=aarch64-windows-gnu
 
----------------
efriedma wrote:
> This is just checking whether llvm-mc crashes; is that intentional?
It's intentional in the sense that I wanted to test that `.align 3` is interpreted as 8 byte alignment; prior to the code change this fails to assemble since 3 bytes isn't a valid alignment.


https://reviews.llvm.org/D35545





More information about the llvm-commits mailing list