[X86] MS inline asm: produce error when encountering "<type> ptr <reg name>"
authorMarina Yatsina <marina.yatsina@intel.com>
Thu, 3 Dec 2015 12:17:03 +0000 (12:17 +0000)
committerMarina Yatsina <marina.yatsina@intel.com>
Thu, 3 Dec 2015 12:17:03 +0000 (12:17 +0000)
commit4b1aea0802c233a2dbfd9c3657b0225017b3edb4
treef62e76ff8a93b9cdf2c417635fbad5320664f9a4
parentfceb4e7cb4e538f329464a2d2b50263b61bbb784
[X86] MS inline asm: produce error when encountering "<type> ptr <reg name>"

Currently "<type> ptr <reg name>" treated as <reg name> in MS inline asm, ignoring the "<type> ptr" completely and possibly ignoring the intention of the user.
Fixed llvm to produce an error when encountering "<type> ptr <reg name>" operands.

For example: andpd xmm1,xmmword ptr xmm1 --> andpd xmm1, xmm1
though andpd has 2 possible matching formats - andpd xmm, xmm/m128

Patch by: ziv.izhar@intel.com
Differential Revision: http://reviews.llvm.org/D14607

llvm-svn: 254607
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
llvm/test/MC/X86/intel-syntax-ambiguous.s