[PATCH] D33278: [LLVM][x86][Inline Asm] - Enum support for MS syntax

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 17 10:33:50 PDT 2017


rnk added a comment.

Please consider using the monorepo to upload and submit this as a single patch.



================
Comment at: include/llvm/MC/MCParser/MCAsmParser.h:64
                                     unsigned &Offset) = 0;
+  virtual bool EvaluateLookupAsEnum(void *LookupResult,int64_t &Result) = 0;
 };
----------------
It would be cleaner if InlineAsmIdentifierInfo simply contained an APInt indicating that the identifier in question was an enum, or other integral constant expression. Less callbacks to implement.


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:722
+  bool ParseIntelExpression(IntelExprStateMachine &SM, SMLoc &End, 
+                            bool &ReplaceEnumIdentifier);
   std::unique_ptr<X86Operand>
----------------
Please try to eliminate the need for this extra boolean out parameter.


Repository:
  rL LLVM

https://reviews.llvm.org/D33278





More information about the cfe-commits mailing list