[Top][All Lists]

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

Re: [Tinycc-devel] TCC code generation for a stack based VM

From: Jim Peters
Subject: Re: [Tinycc-devel] TCC code generation for a stack based VM
Date: Wed, 3 Nov 2004 11:36:14 +0000
User-agent: Mutt/1.3.28i

Fabrice Bellard wrote:
> I really think that a register based VM target would be simpler to add 
> to TCC, and surely faster than a stack based VM.
> I suggest the following parameters:
> - 3 general integer registers, 3 general double registers, load and 
> store based.
> - For each instruction you have at most 3x3 = 9 versions, which you can 
> generate easily with the C preprocessor.

This 3-register plus stack approach reminds me of the Transputer:


Three registers were considered optimal for that design.  When
evaluating an expression, there are lots of intermediate values which
don't really need to go to/from the stack memory.

In the Transputer, if I remember correctly, the registers were also
considered void at every branch point, allowing very quick context
switches between parallel Occam 'threads', although I guess this isn't
relevant to this particular situation.


 Jim Peters                  (_)/=\~/_(_)                 address@hidden
                          (_)  /=\  ~/_  (_)
 Uazú                  (_)    /=\    ~/_    (_)                http://
 Brighton, UK       (_) ____ /=\ ____ ~/_ ____ (_)            uazu.net

reply via email to

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