[llvm-commits] [llvm] r148570 - in /llvm/trunk: lib/Target/X86/AsmParser/X86AsmParser.cpp test/MC/X86/intel-syntax-encoding.s
Devang Patel
dpatel at apple.com
Fri Jan 20 13:21:01 PST 2012
Author: dpatel
Date: Fri Jan 20 15:21:01 2012
New Revision: 148570
URL: http://llvm.org/viewvc/llvm-project?rev=148570&view=rev
Log:
Intel syntax: Parse ... PTR [-8]
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/trunk/test/MC/X86/intel-syntax-encoding.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=148570&r1=148569&r2=148570&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Fri Jan 20 15:21:01 2012
@@ -669,6 +669,11 @@
return ErrorOperand(End, "expected ']' token!");
Parser.Lex();
End = Parser.getTok().getLoc();
+
+ // handle [-42]
+ if (!BaseReg && !IndexReg)
+ return X86Operand::CreateMem(Disp, Start, End, Size);
+
return X86Operand::CreateMem(SegReg, Disp, BaseReg, IndexReg, Scale,
Start, End, Size);
}
Modified: llvm/trunk/test/MC/X86/intel-syntax-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/intel-syntax-encoding.s?rev=148570&r1=148569&r2=148570&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/intel-syntax-encoding.s (original)
+++ llvm/trunk/test/MC/X86/intel-syntax-encoding.s Fri Jan 20 15:21:01 2012
@@ -34,4 +34,5 @@
LBB0_3:
// CHECK: encoding: [0xeb,A]
jmp LBB0_3
-
+// CHECK: encoding: [0xf2,0x0f,0x10,0x2c,0x25,0xf8,0xff,0xff,0xff]
+ movsd XMM5, QWORD PTR [-8]
More information about the llvm-commits
mailing list