[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Porting TCC to RTLinux
From: |
Basile STARYNKEVITCH |
Subject: |
Re: [Tinycc-devel] Porting TCC to RTLinux |
Date: |
Wed, 22 Nov 2006 20:41:02 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Le Wed, Nov 22, 2006 at 12:25:22PM -0500, Calin A. Culianu écrivait/wrote:
>
> Hi,
>
> I am trying to get tinycc-0.9.23 to exist as an embedded facility in the
> linux kernel.
>
> Sound crazy? Want to know why?
>
> Well, the reason for this is that I am writing a realtime linux control
> application that runs in kernel context (under rtlinux). My control
> application dynamically generates a turing machine (basically a finite
> state machine with memory and variables) which then gets run as a realtime
> task.
> Anyway, so I need to be able to generate C code and compile it in the
> kernel.
If you want to generate code dynamically, there are other alternatives
than generating C and compiling it (even with a fast, but not very
efficient, compiler like tcc).
You could generate code in some other low level language. In
particular, C-- has been designed for that (it is a language designed
to be generated, not human written [1]). Also LLVM [2] might be
interesting for you.
You could use some machine code gneneration toolkit, like GNU
lightning [3,4] or libjit [5]. Or some VM with JIT inside like Parrot [6]
Given what I understand of your goals, I would avoid generating source
code, and use lightning or perhaps libjit. BTW, lightning is certainly
usable with a very shallow stack. (But it might not have been ported
to AMD64).
References
1. http://cminusminus.org/
2. http://llvm.org/
3. https://savannah.gnu.org/projects/lightning/
4. http://www.gnu.org/software/lightning/lightning.html
5. http://www.southern-storm.com.au/libjit.html
6. http://www.parrotcode.org/
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faïencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***