[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: VM in assembly language and portability
- From: Reuben Thomas <rrt@...>
- Date: Fri, 22 Jun 2001 18:07:26 +0100 (BST)
(Philippe Lhoste mentioned this in a recent message):
These two are not as exclusive as you might think, although you're unlikely
to gain much speed over simply using GNU C extensions plus some sort of
threaded code (the sort of thing that GNU Forth does, which Anton Ertl has
documented extensively at
http://www.complang.tuwien.ac.at/forth/threaded-code.html).
However, if you still want to write assembly code, you can use a system such
as GNU Lightning (http://www.gnu.org/software/lightning/lightning.html),
which lets you generate fast code at run-time in a portable manner (you
could use this to translate Lua directly to executable code, though again, I
don't think this will give much of a speed gain), or something like my Mite
system (http://www.dcs.gla.ac.uk/~rrt/research.html) to generate portable
assembly code at compile-time that can be assembled at run-time (although my
system does not currently allow run-time linking of mixed C/Mite binaries,
and only works on ARM processors).
I'm working on a simpler version of Mite which could be used to do precisely
what you want: hand-code bits of portable assembler which could then be
assembled into portable object files and linked at run-time using a JIT
compiler. I am currently working on a pure ANSI C interpreter, so you'd be
able to retain full portability too, albeit at the expense of speed compared
with the current system.
Does any of this sound interesting?
--
http://sc3d.org/rrt/ | violence, n. bravery for cowards