[ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + fix bag...
authorMarina Yatsina <marina.yatsina@intel.com>
Mon, 7 Mar 2016 18:10:25 +0000 (18:10 +0000)
committerMarina Yatsina <marina.yatsina@intel.com>
Mon, 7 Mar 2016 18:10:25 +0000 (18:10 +0000)
commit5f776793567cb8d7c55e27a5b4d8e5e75f7f9616
tree8dabfb8aa8f021d75874be8e4449cb41acb04541
parent4896c7a82afc1fc586db170f86f6ca57e61286e8
[ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + fix bag with curly braces

Until now curly braces could only be used in MS inline assembly to mark block start/end.
All curly braces were removed completely at a very early stage.
This approach caused bugs like:
"m{o}v eax, ebx" turned into "mov eax, ebx" without any error.

In addition, AVX-512 added special operands (e.g., k registers), which are also surrounded by curly braces that mark them as such.
Now, we need to keep the curly braces and identify at a later stage if they are marking block start/end (if so, ignore them), or surrounding special AVX-512 operands (if so, parse them as such).

This patch fixes the bug described above and enables the use of AVX-512 special operands.

This commit is the the clang part of the patch.
The clang part of the review is: http://reviews.llvm.org/D17766
The llvm part of the review is: http://reviews.llvm.org/D17767

Differential Revision: http://reviews.llvm.org/D17766

llvm-svn: 262842
clang/lib/Parse/ParseStmtAsm.cpp
clang/test/CodeGen/ms-inline-asm-avx512.c
clang/test/CodeGen/ms-inline-asm.c
clang/test/Parser/ms-inline-asm.c