[PATCH] D11512: Fix conflict for referencing "flags" variable in X86 assembly syntax
Michael Kuperstein
michael.m.kuperstein at intel.com
Thu Jul 30 03:10:58 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL243630: [X86] Recognize "flags" as an identifier, not a register in Intel-syntax… (authored by mkuper).
Changed prior to commit:
http://reviews.llvm.org/D11512?vs=30825&id=31012#toc
Repository:
rL LLVM
http://reviews.llvm.org/D11512
Files:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Index: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -912,6 +912,11 @@
if (RegNo == 0)
RegNo = MatchRegisterName(Tok.getString().lower());
+ // The "flags" register cannot be referenced directly.
+ // Treat it as an identifier instead.
+ if (isParsingInlineAsm() && isParsingIntelSyntax() && RegNo == X86::EFLAGS)
+ RegNo = 0;
+
if (!is64BitMode()) {
// FIXME: This should be done using Requires<Not64BitMode> and
// Requires<In64BitMode> so "eiz" usage in 64-bit instructions can be also
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11512.31012.patch
Type: text/x-patch
Size: 710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150730/8c52c636/attachment.bin>
More information about the llvm-commits
mailing list