This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Token concatenation in gas
- From: Ben Elliston <bje at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: 04 Nov 2002 21:36:52 +1100
- Subject: Re: Token concatenation in gas
- Organization: Red Hat Asia-Pacific Pty Ltd
- References: <3DC63951.5070701@solidas.com>
>>>>> "Svein" == Svein E Seldal <Svein.Seldal@solidas.com> writes:
Svein> Is there a way to do token concatenation in gas macros,
Svein> similar to the ## operator in cpp?
Not that I can see.
Svein> Does anyone have ideas how to do this? I was originally
Svein> thinking on using cpp/#defines instead of gas macros, but cpp
Svein> is unable to generate proper multiline inserts. (right?)
How about this?
#define TEST_INSN(insn) \
insn R0, R0 ;\
insn##3 R0, R0, R0
TEST_INSN(add)
Ben