[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] tcc compile options (assm, C comments)

From: Dave Dodge
Subject: Re: [Tinycc-devel] tcc compile options (assm, C comments)
Date: Thu, 15 Dec 2005 18:33:44 -0500
User-agent: Mutt/1.4.2i

On Thu, Dec 15, 2005 at 02:30:49PM -0700, Kim Lux wrote:
> Is there a way to compile C files into an assembler file ?

I'm not aware of any.  tcc normally goes directly from C code to
object code without producing an intermediate assembly file.

> (For use with an external linker ?)

The resulting .o files should be usable with a linker.

> Does the ARM port generate assembler or machine code ?  I don't see
> assembler code anywhere in gen.c like I do in the C67 port.  Am I
> missing something ?

>From a quick glance: the C67 backend looks like it's using a small
assembler internally to make some of the code simpler, but I think
this is just a design choice specific to the C67 backend.  When it
needs to emit a machine instruction, it can just pass a string to the
assembly function and have it generate the bit pattern.  This probably
also makes it easier to compile inline assembly.

The ARM and i386 backends use a different design, for example see the
store() function in i386-gen.c and notice that it has bit patterns for
several machine instructions hard-coded into it.

                                                  -Dave Dodge

reply via email to

[Prev in Thread] Current Thread [Next in Thread]