tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Retargeting TCC


From: Dave Dodge
Subject: Re: [Tinycc-devel] Retargeting TCC
Date: Mon, 28 Feb 2005 00:02:51 -0500
User-agent: Mutt/1.4.2i

On Thu, Feb 24, 2005 at 12:57:41PM -0800, Christopher Dobbs wrote:
> I have a VirtualProcessor that I have designed.
> How would I go about retargeting TinyCC to compile code for it?

I believe you'll have to implement a generator backend.  Look at the
i386-gen.c, arm-gen.c, and c67-gen.c files in the source tree for
examples of how this is done for other architectures.

Note that there are apparently some issues with byte ordering, such
that the compile and target hosts must have the same endianness if you
want the output to be sensible.  But I don't know if that's due to the
the *-gen implementation itself or part of the core compiler code.

> I have an [MTN]ASM compatible assembler for the proc,

tcc does not normally generate any intermediate assembly; it goes
directly from C code to object code.  It might be possible to create a
generator that outputs some sort of assembly, but I don't know enough
about that part of the compiler to say for sure.

                                                  -Dave Dodge




reply via email to

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