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]

Re: Token concatenation in gas


>>>>> "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



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