This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: GCC calling GNU assembler


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-owner@gcc.gnu.org [mailto:gcc-owner@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
> 
> 


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