[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:
http://en.wikipedia.org/wiki/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
--
Jim Peters (_)/=\~/_(_) address@hidden
(_) /=\ ~/_ (_)
Uazú (_) /=\ ~/_ (_) http://
Brighton, UK (_) ____ /=\ ____ ~/_ ____ (_) uazu.net
- Re: [Tinycc-devel] TCC code generation for a stack based VM, Zoltán Lörincz, 2004/11/03
- Re: [Tinycc-devel] TCC code generation for a stack based VM, Fabrice Bellard, 2004/11/03
- Re: [Tinycc-devel] TCC code generation for a stack based VM, Zoltán Lörincz, 2004/11/03
- Re: [Tinycc-devel] TCC code generation for a stack based VM, Fabrice Bellard, 2004/11/03
- Re: [Tinycc-devel] TCC code generation for a stack based VM, lucas wix, 2004/11/03
- Re: [Tinycc-devel] TCC code generation for a stack based VM, David Hovemeyer, 2004/11/03
- Re: [Tinycc-devel] TCC code generation for a stack based VM, Alan Grimes, 2004/11/04