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

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 09:43:38 PST 2021


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/include/llvm/MC/MCAsmInfo.h:572
+  // Allow overriding default dialect for inline assembler.
+  virtual unsigned getInlineAsmDialect(InlineAsm::AsmDialect asmDialect) const {
+    return getAssemblerDialect();
----------------
The parameter here needs to be explained more clearly. This function seems to be compensating for problems in the applicability/correctness of what the input argument represents. I think a function that just actually gives a default dialect for the inline assembly would be easier to understand. I guess that in cases where the input to this function matters, we should consider changing the code where the input argument was originally set.


================
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
----------------
Why is this comment removed?


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