[PATCH] D35621: X86 Asm can't work properly with symbolic Scale
Andrew V. Tischenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 10 04:30:43 PDT 2017
avt77 added inline comments.
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:591
+ bool onIdentifierExpr(const MCExpr *SymRef, StringRef SymRefName,
+ StringRef &ErrMsg, bool isParsingInlineAsm,
> avt77 wrote:
> > coby wrote:
> > > (#)
> > > Note that the two conditions (isParsingInlineAsm) and (SymRef->getKind() == llvm::MCExpr::Constant) never coexist in the current code due to the way Assembly Constants are being treated when parsing MS InlineAsm.
> > > I'm not sure whether it is intended or not - does MSVC inline assembler allow any kind of Assembly Constants?
> > Do you mean that this function can't be called if isParsingInlineAsm == true?
> I mean that (isParsingInlineAsm() && SymRef->getKind() == llvm::MCExpr::Constant) will never yield 'true' on current code state.
> IMHO, we should aim for assembly level only.
> So, combining the two we may limit this patch to Assembly parsing only
In this case I could simply produce error message if (isParsingInlineAsm() && SymRef->getKind() == llvm::MCExpr::Constant) , right?
More information about the llvm-commits