This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Incomplete .macro documentation?


Hi,

if I define macro as follows:

.macro TEST n
.equ REG\n_TEST,0
.equ REG\n_TEST,1
.endm

then 'TEST 1' will not produce what I've desired, because expansion can't that
simply handle arguments which are in the middle of statement. So after some
struggle I have found in the macro.c that it has to be done as follows:

.macro TEST n
.equ REG\n\(_)TEST,0
.equ REG\n\(_)TEST,1
.endm

This I take is a feature of macros, but I didn't find anything about this in
binutils manual (e.i. http://sources.redhat.com/binutils/docs-2.12/as.info/Macro.html)
Or is it described anywhere? If not I think that it should be added :)) OK I
can add it if anybody will point me to correct place ;)

Jan





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]