[llvm] r181564 - [x86AsmParser] It's valid to stop parsing an operand at an immediate.
Chad Rosier
mcrosier at apple.com
Thu May 9 16:48:53 PDT 2013
Author: mcrosier
Date: Thu May 9 18:48:53 2013
New Revision: 181564
URL: http://llvm.org/viewvc/llvm-project?rev=181564&view=rev
Log:
[x86AsmParser] It's valid to stop parsing an operand at an immediate.
rdar://13854369 and PR15944
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/trunk/test/MC/X86/intel-syntax.s
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=181564&r1=181563&r2=181564&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Thu May 9 18:48:53 2013
@@ -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; }
Modified: llvm/trunk/test/MC/X86/intel-syntax.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/intel-syntax.s?rev=181564&r1=181563&r2=181564&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/intel-syntax.s (original)
+++ llvm/trunk/test/MC/X86/intel-syntax.s Thu May 9 18:48:53 2013
@@ -322,4 +322,6 @@ _main:
setnle al
// CHECK: jne _foo
jnz _foo
+// CHECK: outb %al, $4
+ out 4, al
ret
More information about the llvm-commits
mailing list