[MC] [IAS] Add support for the \@ .macro pseudo-variable.
authorToma Tabacu <toma.tabacu@imgtec.com>
Mon, 27 Apr 2015 10:50:29 +0000 (10:50 +0000)
committerToma Tabacu <toma.tabacu@imgtec.com>
Mon, 27 Apr 2015 10:50:29 +0000 (10:50 +0000)
commit0b5a15b7792667950eca935b97540202aaa51343
treeae3584bd746f8cf5d7bbc73f98b6dcde1ca1f4ba
parent59764b94a7f64e8622d1b6052537fd14763f55cc
[MC] [IAS] Add support for the \@ .macro pseudo-variable.

Summary:
When used, it is substituted with the number of .macro instantiations we've done up to that point in time.
So if this is the 1st time we've instantiated a .macro (any .macro, regardless of name), \@ will instantiate to 0, if it's the 2nd .macro instantiation, it will instantiate to 1 etc.

It can only be used inside a .macro definition, an .irp definition or an .irpc definition (those last 2 uses are undocumented).

Reviewers: echristo, rafael

Reviewed By: rafael

Subscribers: dsanders, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235862 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCParser/AsmParser.cpp
test/MC/AsmParser/at-pseudo-variable-bad.s [new file with mode: 0644]
test/MC/AsmParser/at-pseudo-variable.s [new file with mode: 0644]