[llvm-commits] [llvm] r148334 - in /llvm/trunk: lib/Target/X86/AsmParser/X86AsmParser.cpp test/MC/X86/intel-syntax.s
Devang Patel
dpatel at apple.com
Tue Jan 17 13:25:10 PST 2012
Author: dpatel
Date: Tue Jan 17 15:25:10 2012
New Revision: 148334
URL: http://llvm.org/viewvc/llvm-project?rev=148334&view=rev
Log:
Intel syntax: Parse "BYTE PTR [RDX + RCX]"
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=148334&r1=148333&r2=148334&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Tue Jan 17 15:25:10 2012
@@ -637,6 +637,10 @@
Disp = isPlus ? ValExpr : MCUnaryExpr::CreateMinus(ValExpr, getContext());
} else
return ErrorOperand(PlusLoc, "unexpected token after +");
+ } else if (getLexer().is(AsmToken::Identifier)) {
+ IndexReg = getIntelRegisterOperand(Tok.getString());
+ if (IndexReg)
+ Parser.Lex();
}
}
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=148334&r1=148333&r2=148334&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/intel-syntax.s (original)
+++ llvm/trunk/test/MC/X86/intel-syntax.s Tue Jan 17 15:25:10 2012
@@ -23,6 +23,8 @@
mov RCX, QWORD PTR [0]
// CHECK: movl -24(%rsp,%rax,4), %eax
mov EAX, DWORD PTR [RSP + 4*RAX - 24]
+// CHECK: movb %dil, (%rdx,%rcx)
+ mov BYTE PTR [RDX + RCX], DIL
// CHECK: callq _test
call _test
ret
More information about the llvm-commits
mailing list