[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)
commit3a64f1988f06b903d52d74eebceb77ff31581956
tree5ae83fe7222b8f88be4898c2e4a8cc6047b911bc
parent1051eae13a0f6397361617b1efab909cc7ba7c19
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254607 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/AsmParser/X86AsmParser.cpp
test/MC/X86/intel-syntax-ambiguous.s