How to use C macros in asm

Kapileswar Rao kapileswar_rao@mentorg.com
Wed Nov 5 10:10:00 GMT 2003


Hello,
    I am trying to use a C macro inside the asm instruction.But inside
the asm instruction macro is not replaced by macro definition. Is there
anyway I can do that.

Here is an Example what I want to do.

#define Register  R0

asm("mov Register, #1");

I want the Register in assembly instruction to be replaced by R0. Is
there any option which could do that.

Thanks and Regards,
--Kapil



More information about the Gcc-help mailing list