mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 03:32:10 +00:00
[X86] Recognize "flags" as an identifier, not a register in Intel-syntax inline asm
Patch by: marina.yatsina@intel.com Differential Revision: http://reviews.llvm.org/D11512 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243630 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d8c145fd49
commit
78a589c319
@ -912,6 +912,11 @@ bool X86AsmParser::ParseRegister(unsigned &RegNo,
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user