tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Retargeting TCC


From: Christopher Dobbs
Subject: Re: [Tinycc-devel] Retargeting TCC
Date: Mon, 28 Feb 2005 07:35:15 -0800
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

Could some one send me more information about the code generation aspects of tcc, so I can write my own code generator.

--
Christopher Dobbs


Dave Dodge wrote:
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


_______________________________________________
Tinycc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tinycc-devel
  


reply via email to

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