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]

Token concatenation in gas


Hello,

Is there a way to do token concatenation in gas macros, similar to the ## operator in cpp?

This what I want to do:

.macro TEST_INSN insn
\insn R0, R0
\insn ## 3 R0, R0, R0
.endm
TEST_INSN add

This should give the following code:

add R0, R0
add3 R0, R0, R0

Does anyone have ideas how to do this? I was originally thinking on using cpp/#defines instead of gas macros, but cpp is unable to generate proper multiline inserts. (right?)

Thanks,
Svein


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