This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Token concatenation in gas
- From: "Svein E. Seldal" <Svein dot Seldal at solidas dot com>
- To: binutils at sources dot redhat dot com
- Date: Mon, 04 Nov 2002 10:09:37 +0100
- Subject: 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