From: Chad Rosier Date: Thu, 9 May 2013 23:48:53 +0000 (+0000) Subject: [x86AsmParser] It's valid to stop parsing an operand at an immediate. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a70d02ff2841d535875fe80bd3d3c25ba90613da;p=oota-llvm.git [x86AsmParser] It's valid to stop parsing an operand at an immediate. rdar://13854369 and PR15944 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181564 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index 68908abb576..520c4c0048e 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -219,7 +219,9 @@ private: const MCExpr *getSym() { return Sym; } StringRef getSymName() { return SymName; } int64_t getImm() { return Imm + IC.execute(); } - bool isValidEndState() { return State == IES_RBRAC; } + bool isValidEndState() { + return State == IES_RBRAC || State == IES_INTEGER; + } bool getStopOnLBrac() { return StopOnLBrac; } bool getAddImmPrefix() { return AddImmPrefix; } bool hadError() { return State == IES_ERROR; } diff --git a/test/MC/X86/intel-syntax.s b/test/MC/X86/intel-syntax.s index b2f337dac9d..fa1ba5ba543 100644 --- a/test/MC/X86/intel-syntax.s +++ b/test/MC/X86/intel-syntax.s @@ -322,4 +322,6 @@ _main: setnle al // CHECK: jne _foo jnz _foo +// CHECK: outb %al, $4 + out 4, al ret