How to use C macros in asm

Falk Hueffner falk.hueffner@student.uni-tuebingen.de
Wed Nov 5 10:19:00 GMT 2003


Kapileswar Rao <kapileswar_rao@mentorg.com> writes:

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

#define foo(R0) asm("mov Register, " #R0);

-- 
	Falk



More information about the Gcc-help mailing list