This is an archive of the discontinued LLVM Phabricator instance.

[ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + fix bag with curly braces
ClosedPublic

Authored by myatsina on Mar 1 2016, 6:35 AM.

Details

Summary

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 review is for the clang part.
The llvm part of the review is: http://reviews.llvm.org/D17767

Diff Detail

Repository
rL LLVM

Event Timeline

myatsina updated this revision to Diff 49482.Mar 1 2016, 6:35 AM
myatsina retitled this revision from to [ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + fix bag with curly braces.
myatsina updated this object.
myatsina added reviewers: rnk, ehsan, mcrosier, delena.
myatsina set the repository for this revision to rL LLVM.
myatsina updated this object.
myatsina added a subscriber: llvm-commits.
ehsan accepted this revision.Mar 1 2016, 7:36 AM
ehsan edited edge metadata.

LGTM.

lib/Parse/ParseStmtAsm.cpp
446

Nit: *brace

This revision is now accepted and ready to land.Mar 1 2016, 7:36 AM
myatsina updated this revision to Diff 49945.Mar 7 2016, 3:43 AM
myatsina edited edge metadata.
myatsina marked an inline comment as done.
myatsina added a subscriber: cfe-commits.

Updated test to reflect changes in the llvm part of the review (http://reviews.llvm.org/D17767)

This revision was automatically updated to reflect the committed changes.