This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: GCC calling GNU assembler
- From: "Bingfeng Mei" <bmei at broadcom dot com>
- To: "Nikola Ikonic" <nikola dot ikonic at gmail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 3 Feb 2010 03:19:11 -0800
- Subject: RE: GCC calling GNU assembler
- References: <737708261002030126p526f12a3y28d6d2afd5c3e6e3@mail.gmail.com>
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
>
>