tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Syncing caches


From: Jim Peters
Subject: Re: [Tinycc-devel] Syncing caches
Date: Wed, 13 Nov 2002 14:09:20 +0000
User-agent: Mutt/1.2.5i

Basile STARYNKEVITCH wrote:
> An alternative might be (for Jim's need) to use the GNU lightning
> library, which provides a way to generate machine code at runtime, in
> a portable fashion (by using a  machine model which is a RISC with 6
> registers). See http://www.gnu.org/software/lightning/

This looks interesting.  However, floating point is only currently
experimental on i386, unsupported on other architectures.


>     Jim> The only concern I have is about processor caches. 
> 
> lightning deals with this (thru jit_flush_code).

... which on x86 is an empty macro.  (There are much longer functions
to handle it on PPC and Sparc).  This confirms what Julian said.  The
x86 FAQ incidentally had no mention of it, probably because x86 coders
have never had to worry about it.

This whole thing of code generation becoming more accessible (libtcc,
lightening, etc) is very exciting.  For instance, if you have a big
job to run with particular parameters, you can specialize the routine
at run-time, compile the specialized version to memory, and run that
instead.

There is a Python interpreter/compiler/specializer (psyco.sf.net) that
I found interesting to read about -- at each step during *execution*
it decides whether it would prefer to interpret this or compile it and
run it.  I'm not a Python fan, but these ideas do open up very
interesting possibilities.


> You might also look into the way Squeak is compiling Smalltalk to
> machine code. See http://www.squeak.org/
> 
> Both lightning & squeak are based on Ian Piumarta's code generator
> called CCG.

Thanks, I'll take a look.

Jim

-- 
 Jim Peters                  (_)/=\~/_(_)                 address@hidden
                          (_)  /=\  ~/_  (_)
 UazĂș                  (_)    /=\    ~/_    (_)                http://
 B'ham, UK          (_) ____ /=\ ____ ~/_ ____ (_)            uazu.net

 OpenEEG -- EEG for the rest of us!   For details:  http://uazu.net/OE




reply via email to

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