On Thu, Dec 15, 2005 at 04:08:10PM -0700, Kim Lux wrote:
> C67 can assemble assembly language.

Actually I'm not sure that it can.  I haven't tried using it, but I
notice in tcc.c that the assembly stuff is all protected by
CONFIG_TCC_ASM, which is disabled for both ARM and C67.  I also notice
that the assembler frontend code in tccasm.c calls asm_opcode(), which
only exists in the i386 backend.

So while C67 has a mini-assembler within it, I'm not sure if it's
really accessible from sourcecode.

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

It would probably work.

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

Again, it would probably work, assuming you also make it possible for
tcc to read and process the assembly.

> 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...)

There's tcc_compile_string() in libtcc.h, but it probably wants a
complete translation unit rather than a single statement.  I've never
tried using it.

                                                  -Dave Dodge


_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to