tinycc-devel
[Top][All Lists]
Advanced

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

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


From: Kim Lux
Subject: Re: [Tinycc-devel] tcc compile options (assm, C comments)
Date: Thu, 15 Dec 2005 16:08:10 -0700

On Thu, 2005-12-15 at 18:33 -0500, Dave Dodge wrote:
> 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.

I just figured that out looking at the ARM emits.  ARM outputs machine
code directly.  It doesn't have an assembler.  It can't assemble an
assembly file.  C67 can assemble assembly language.  It also uses the
assembler to make its own emits.

Right ? 

What would stop me from writing the back end to emit assembly ?

If I implemented the assembler ala C67, tcc could assemble its own
emitted assembly code.

Is there a mechanism in the front end to pass an entire C statement to
the back end for emission ?  (I'll admit I haven't looked in the parser
yet...)

When o is called, it could check for a new compiler line.  If it gets
one, it could emit it as an assembler comment. 

-- 
Kim Lux,  Diesel Research Inc.






reply via email to

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