[Top][All Lists]

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

[Tinycc-devel] Stack based target machine

From: Nick Kelsey
Subject: [Tinycc-devel] Stack based target machine
Date: Sun, 19 Jun 2005 17:39:22 -0700
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)


I have spent most of the weekend looking through the TCC backend code... very impressed... this has the potential to be the ideal solution to the problem I have in mind.

TCC already covers the first requirement - a compiler that is practical to ship to end-users so they can write their own "scripts" that interact with our application.
On the server side TCC can compile to a native x86 machine - perfect.

We also have a number of different embedded platforms... the goal is to run a single program on any of these platforms. Unfortunately they have insufficient resources to run TCC natively, so I am looking at compiling to a virtual machine. Actually a virtual machine solves another problem - memory. We have two platforms that have limited core-addressable memory (one has less than 4k) and a VM would allow us to make use of IO addressable external memory by making it c-addressable.

I am leaning towards the idea of a stack based VM to keep things simple on the VM side (ie no general purpose registers thus no register decoding and addressing required by the host cpu). In reality the hardest aspect will be the compiler port so that will dictate the VM architecture more than anything else.

I made a few hacks in the backend of TCC but I think I am still missing some concepts. In particular the register allocator (gv).

Time to pause and run the concept past you... I am happy to put time into coding but would appreciate your thoughts and advice.

BTW - I have written a few VMs in the past, including a cycle-accurate simulator of a pipelined processor that was used commercially for VLSI testing.

Great product, and I hope to be part of the TCC community.


reply via email to

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