[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: |
Zoltán Lörincz |
Subject: |
Re: [Tinycc-devel] TCC code generation for a stack based VM |
Date: |
Wed, 3 Nov 2004 12:28:44 +0200 |
Hello Mirar,
thank you again for your answer.
I also thought that it would be easier to generate byte code for a
register based VM.
But then the interpreter, would be slower and more comlicated.
For example for an i386 style asm code: "mov ax, bx" in the byte code
i should generate
- the opcode for move
- then bitfields where i specify that the move is between ax and bx
(in our case)
Decoding this in the interpreter would take more processing time than
in a stack based machine.
There I don't need to decode anything in this way, only to make a
switch by the opcodes and do the corresponding operations.
Do you have an idea how i could encode/decode the registers/immediate
values, without too much processing time?
Best regards,
Zoltan.
On Tue, 02 Nov 2004 19:48:57 +0100, Mirar <address@hidden> wrote:
> > Unfortunately it is not in my hands to change the requirements.
>
> It was just an idea :)
>
> > On the other hand, if we would use TCC for JIT compiling then for
> > every new processor we would need to write a code generator wich we
> > would like to avoid.
>
> Nah, you would require TCC to work for every new processor. The code
> would stay the same (since it would be in C)? I didn't know you
> switched processors that often.
>
> TCC is rather small though (a few 100k), quite comparable to an
> interpreter.
>
> Why not make a registered based byte code interpreter, it might be
> easier then rewriting tcc? (I haven't seen any answer whether tcc can
> do that yet, but...)
>
> /Mirar
>
- 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
- [Tinycc-devel] .rept .endr support, Marc E. Fiuczynski, 2004/11/03