Displaying 1 result from an estimated 1 matches for "expandmacro".
Did you mean:
expand_macro
2012 May 23
0
[LLVMdev] Assembly macros instantiation problem
...lowing code snippet would fail with "Parameter not found" error:
.macro mov_macro reg_1, reg_2
movl %\reg_1, %\reg_2
.endm
mov_macro eax, ebx
Although, if one removes underscores from mov_macro argument names, compilation would succeed.
Such behavior is due to the glitch in AsmParser::expandMacro() logic: it treats first non-alphanumeric character as the end of argument instantiation token.
Following patch fixes the issue (IsIdentifierChar routine implementation was borrowed from lib/MC/MCParser/AsmLexer.cpp):
===================================================================
--- lib/MC/M...