Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22237

GNU assembler Macros

$
0
0

I am trying to build a simple macro in GNU assembler (2.26.1) (gcc 5.4.0) but getting some error after several interactions: Invalid character '(' in mnemonic

I've tried to follow the advice at https://sourceware.org/binutils/docs/as/Macro.html with \() or & but no luck.

    .macro macro_gen_irqh isrb, isre    _irq_entry_\isrb\():        cli        call isr_common_handler        .if  \isre-\isrb           macro_gen_irqh    "(\isrb+1)",\isre       .endif    .endm

If I replace the label _irq_entry_\isrb(): to "(\isrb)": it does work for the enumeration but without the required full label name.

The end result should be:

_irq_entry_0:   cli   call isr_common_handler_irq_entry_1:.._irq_entry_2:..

Viewing all articles
Browse latest Browse all 22237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>