GCC just literally emits the string in your asm expression together with other
assembly code generated by compiler. Only in next step assembler is invoked by 
GCC driver. 

Typically, hard register number is not used so that GCC can do register 
allocation
for inline assembly. 

Bingfeng 

> -----Original Message-----
> From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] On 
> Behalf Of Nikola Ikonic
> Sent: 03 February 2010 09:27
> To: gcc@gcc.gnu.org
> Subject: GCC calling GNU assembler
> 
> Hello all,
> 
> Could anybody please answer me on following question:
> 
> where is GCC callin assembler where it recognizes assembler code in C
> function? For example, let's say that there is this line in C code:
> 
> asm("mov r1,r0");
> 
> So, the parser parses this as an assembler string. But where, in GCC
> code, is assembler called to process this string?
> Or maybe the question is where this "mov r1, r0" string is passed to
> assembler. Anyway, I think you got my question.
> 
> Thanks in advance!
> 
> Best regards,
>            Nikola
> 
> 

Reply via email to