[PATCH] D11512: Fix conflict for referencing "flags" variable in X86 assembly syntax
Reid Kleckner
rnk at google.com
Mon Jul 27 11:05:46 PDT 2015
rnk added inline comments.
================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:808
@@ -807,2 +807,3 @@
+ unsigned FixMatchedRegister(unsigned RegNo);
bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) override;
----------------
I don't think you need the helper method in this case. I expect there will only ever be one caller, so you can just inline it.
================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:922
@@ -910,2 +921,3 @@
RegNo = MatchRegisterName(Tok.getString().lower());
+ RegNo = FixMatchedRegister(RegNo);
----------------
I'm thinking:
// The "flags" register cannot be referenced directly. Treat it as an identifier instead.
if (isParsingInlineAsm() && RegNo == X86::EFLAGS)
RegNo = 0;
Repository:
rL LLVM
http://reviews.llvm.org/D11512
More information about the llvm-commits
mailing list