[PATCH] D95444: Allow GNU inline asm using target-specific dialect variant

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 17:09:27 PST 2021


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp:21-22
 enum AsmWriterFlavorTy {
-  // Note: This numbering has to match the GCC assembler dialects for inline
-  // asm alternatives to work right.
   ATT = 0, Intel = 1
----------------
uweigand wrote:
> hubert.reinterpretcast wrote:
> > Why is this comment removed?
> Well, the whole reason the numbering had to match was that the value is currently overloaded between the "GNU vs. MS" values and "AT&T vs Intel" values.  With the patch, the overload is no longer present (the correspondence is rather explicitly provided via a function), and therefore the numbers no longer have to match.
This patch provides a correspondence from some input //to// these values. I am not seeing where the consumers (i.e., via `AsmWriterFlavor` and `AssemblerDialect`, the callers of `getAssemblerDialect`) are being updated by this patch to not be sensitive to the specific numbering here.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95444/new/

https://reviews.llvm.org/D95444



More information about the llvm-commits mailing list